Class: CentrumFaktur::Client
- Inherits:
-
Object
- Object
- CentrumFaktur::Client
- Defined in:
- lib/centrum_faktur/client.rb
Instance Attribute Summary collapse
-
#login ⇒ Object
readonly
Returns the value of attribute login.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#subdomain ⇒ Object
readonly
Returns the value of attribute subdomain.
Instance Method Summary collapse
- #account ⇒ Object
- #comment ⇒ Object
- #customer ⇒ Object
- #estimate ⇒ Object
-
#initialize(configuration = {}) ⇒ Client
constructor
A new instance of Client.
- #invoice ⇒ Object
- #payment ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(configuration = {}) ⇒ Client
Returns a new instance of Client.
5 6 7 8 9 |
# File 'lib/centrum_faktur/client.rb', line 5 def initialize(configuration = {}) @login = configuration[:login] || raise(ArgumentError.new("You must specify login")) @password = configuration[:password] || raise(ArgumentError.new("You must specify password")) @subdomain = configuration[:subdomain] || raise(ArgumentError.new("You must specify subdomain")) end |
Instance Attribute Details
#login ⇒ Object (readonly)
Returns the value of attribute login.
3 4 5 |
# File 'lib/centrum_faktur/client.rb', line 3 def login @login end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
3 4 5 |
# File 'lib/centrum_faktur/client.rb', line 3 def password @password end |
#subdomain ⇒ Object (readonly)
Returns the value of attribute subdomain.
3 4 5 |
# File 'lib/centrum_faktur/client.rb', line 3 def subdomain @subdomain end |
Instance Method Details
#account ⇒ Object
11 12 13 |
# File 'lib/centrum_faktur/client.rb', line 11 def account API::Account.new(self) end |
#comment ⇒ Object
15 16 17 |
# File 'lib/centrum_faktur/client.rb', line 15 def comment API::Comment.new(self) end |
#customer ⇒ Object
19 20 21 |
# File 'lib/centrum_faktur/client.rb', line 19 def customer API::Customer.new(self) end |
#estimate ⇒ Object
23 24 25 |
# File 'lib/centrum_faktur/client.rb', line 23 def estimate API::Estimate.new(self) end |
#invoice ⇒ Object
27 28 29 |
# File 'lib/centrum_faktur/client.rb', line 27 def invoice API::Invoice.new(self) end |