Class: Taxjar::Client
- Inherits:
-
Object
- Object
- Taxjar::Client
- Includes:
- API, API::Order, API::Refund
- Defined in:
- lib/taxjar/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
- #api_key? ⇒ Boolean
-
#initialize(options = {}) {|_self| ... } ⇒ Client
constructor
A new instance of Client.
- #user_agent ⇒ Object
Methods included from API::Refund
#create_refund, #delete_refund, #list_refunds, #show_refund, #update_refund
Methods included from API::Utils
#perform_delete_with_object, #perform_get_with_array, #perform_get_with_object, #perform_get_with_objects, #perform_post_with_object, #perform_put_with_object, #perform_request, #perform_request_with_array, #perform_request_with_object, #perform_request_with_objects
Methods included from API::Order
#create_order, #delete_order, #list_orders, #show_order, #update_order
Methods included from API
#categories, #rates_for_location, #summary_rates, #tax_for_order, #validate
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ Client
Returns a new instance of Client.
16 17 18 19 20 21 |
# File 'lib/taxjar/client.rb', line 16 def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) end yield(self) if block_given? end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
14 15 16 |
# File 'lib/taxjar/client.rb', line 14 def api_key @api_key end |
Instance Method Details
#api_key? ⇒ Boolean
23 24 25 |
# File 'lib/taxjar/client.rb', line 23 def api_key? !!@api_key end |
#user_agent ⇒ Object
27 28 29 |
# File 'lib/taxjar/client.rb', line 27 def user_agent "TaxjarRubyGem/#{Taxjar::Version}" end |