Class: Fakturownia::Client
- Inherits:
-
Object
- Object
- Fakturownia::Client
- Defined in:
- lib/fakturownia/client.rb
Instance Attribute Summary collapse
-
#api_token ⇒ Object
readonly
Returns the value of attribute api_token.
-
#subdomain ⇒ Object
readonly
Returns the value of attribute subdomain.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #invoice ⇒ Object (also: #invoices)
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
5 6 7 8 9 10 |
# File 'lib/fakturownia/client.rb', line 5 def initialize( = {}) @subdomain = [:subdomain] || raise(ArgumentError.new('subdomain is required')) @api_token = [:api_token] || raise(ArgumentError.new('api_token is required')) end |
Instance Attribute Details
#api_token ⇒ Object (readonly)
Returns the value of attribute api_token.
3 4 5 |
# File 'lib/fakturownia/client.rb', line 3 def api_token @api_token end |
#subdomain ⇒ Object (readonly)
Returns the value of attribute subdomain.
3 4 5 |
# File 'lib/fakturownia/client.rb', line 3 def subdomain @subdomain end |
Instance Method Details
#invoice ⇒ Object Also known as: invoices
12 13 14 |
# File 'lib/fakturownia/client.rb', line 12 def invoice Fakturownia::Api::Invoice.new(self) end |