Class: Varejonline::Client
- Inherits:
-
Object
- Object
- Varejonline::Client
show all
- Extended by:
- ClassMethods
- Includes:
- HTTParty
- Defined in:
- lib/varejonline/client.rb
Direct Known Subclasses
API::CardNegotiations, API::CategoryLevels, API::ClientClasses, API::Companies, API::CreditLimits, API::DefaultEntries, API::Entities, API::Installments, API::Orders, API::Payables, API::PaymentConditions, API::Payments, API::ProductCategories, API::Products, API::Provisions, API::Receivables, API::SalesHistory, API::Sellers, API::ThirdParties, API::Units, 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.
19
20
21
22
|
# File 'lib/varejonline/client.rb', line 19
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.
17
18
19
|
# File 'lib/varejonline/client.rb', line 17
def access_token
@access_token
end
|
Instance Method Details
#card_negotiations ⇒ Object
100
101
102
|
# File 'lib/varejonline/client.rb', line 100
def card_negotiations
Varejonline::API::CardNegotiations.new(@access_token)
end
|
#category_levels ⇒ Object
84
85
86
|
# File 'lib/varejonline/client.rb', line 84
def category_levels
Varejonline::API::CategoryLevels.new(@access_token)
end
|
#client_classes ⇒ Object
60
61
62
|
# File 'lib/varejonline/client.rb', line 60
def client_classes
Varejonline::API::ClientClasses.new(@access_token)
end
|
#companies ⇒ Object
72
73
74
|
# File 'lib/varejonline/client.rb', line 72
def companies
Varejonline::API::Companies.new(@access_token)
end
|
#credit_limits ⇒ Object
48
49
50
|
# File 'lib/varejonline/client.rb', line 48
def credit_limits
Varejonline::API::CreditLimits.new(@access_token)
end
|
#default_entries ⇒ Object
32
33
34
|
# File 'lib/varejonline/client.rb', line 32
def default_entries
Varejonline::API::DefaultEntries.new(@access_token)
end
|
#entities ⇒ Object
28
29
30
|
# File 'lib/varejonline/client.rb', line 28
def entities
Varejonline::API::Entities.new(@access_token)
end
|
#installments ⇒ Object
44
45
46
|
# File 'lib/varejonline/client.rb', line 44
def installments
Varejonline::API::Installments.new(@access_token)
end
|
#orders ⇒ Object
68
69
70
|
# File 'lib/varejonline/client.rb', line 68
def orders
Varejonline::API::Orders.new(@access_token)
end
|
#payables ⇒ Object
56
57
58
|
# File 'lib/varejonline/client.rb', line 56
def payables
Varejonline::API::Payables.new(@access_token)
end
|
#payment_conditions ⇒ Object
92
93
94
|
# File 'lib/varejonline/client.rb', line 92
def payment_conditions
Varejonline::API::PaymentConditions.new(@access_token)
end
|
#payments ⇒ Object
96
97
98
|
# File 'lib/varejonline/client.rb', line 96
def payments
Varejonline::API::Payments.new(@access_token)
end
|
#product_categories ⇒ Object
88
89
90
|
# File 'lib/varejonline/client.rb', line 88
def product_categories
Varejonline::API::ProductCategories.new(@access_token)
end
|
#products ⇒ Object
80
81
82
|
# File 'lib/varejonline/client.rb', line 80
def products
Varejonline::API::Products.new(@access_token)
end
|
#provisions ⇒ Object
36
37
38
|
# File 'lib/varejonline/client.rb', line 36
def provisions
Varejonline::API::Provisions.new(@access_token)
end
|
#receivables ⇒ Object
52
53
54
|
# File 'lib/varejonline/client.rb', line 52
def receivables
Varejonline::API::Receivables.new(@access_token)
end
|
#sales_history ⇒ Object
64
65
66
|
# File 'lib/varejonline/client.rb', line 64
def sales_history
Varejonline::API::SalesHistory.new(@access_token)
end
|
#sellers ⇒ Object
76
77
78
|
# File 'lib/varejonline/client.rb', line 76
def sellers
Varejonline::API::Sellers.new(@access_token)
end
|
#third_parties ⇒ Object
24
25
26
|
# File 'lib/varejonline/client.rb', line 24
def third_parties
Varejonline::API::ThirdParties.new(@access_token)
end
|
#units ⇒ Object
104
105
106
|
# File 'lib/varejonline/client.rb', line 104
def units
Varejonline::API::Units.new(@access_token)
end
|
#user_data ⇒ Object
40
41
42
|
# File 'lib/varejonline/client.rb', line 40
def user_data
Varejonline::API::UserData.new(@access_token)
end
|