Class: GoCardlessPro::Resources::TaxRate
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::TaxRate
- Defined in:
- lib/gocardless_pro/resources/tax_rate.rb
Overview
Tax rates from tax authority.
We also maintain a [static list of the tax rates for each jurisdiction](#appendix-tax-rates).
Instance Attribute Summary collapse
-
#end_date ⇒ Object
readonly
Returns the value of attribute end_date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#jurisdiction ⇒ Object
readonly
Returns the value of attribute jurisdiction.
-
#percentage ⇒ Object
readonly
Returns the value of attribute percentage.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ TaxRate
constructor
Initialize a tax_rate resource instance.
-
#to_h ⇒ Object
Provides the tax_rate resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ TaxRate
Initialize a tax_rate resource instance
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gocardless_pro/resources/tax_rate.rb', line 22 def initialize(object, response = nil) @object = object @end_date = object['end_date'] @id = object['id'] @jurisdiction = object['jurisdiction'] @percentage = object['percentage'] @start_date = object['start_date'] @type = object['type'] @response = response end |
Instance Attribute Details
#end_date ⇒ Object (readonly)
Returns the value of attribute end_date.
18 19 20 |
# File 'lib/gocardless_pro/resources/tax_rate.rb', line 18 def end_date @end_date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
18 19 20 |
# File 'lib/gocardless_pro/resources/tax_rate.rb', line 18 def id @id end |
#jurisdiction ⇒ Object (readonly)
Returns the value of attribute jurisdiction.
18 19 20 |
# File 'lib/gocardless_pro/resources/tax_rate.rb', line 18 def jurisdiction @jurisdiction end |
#percentage ⇒ Object (readonly)
Returns the value of attribute percentage.
18 19 20 |
# File 'lib/gocardless_pro/resources/tax_rate.rb', line 18 def percentage @percentage end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
18 19 20 |
# File 'lib/gocardless_pro/resources/tax_rate.rb', line 18 def start_date @start_date end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
18 19 20 |
# File 'lib/gocardless_pro/resources/tax_rate.rb', line 18 def type @type end |
Instance Method Details
#api_response ⇒ Object
34 35 36 |
# File 'lib/gocardless_pro/resources/tax_rate.rb', line 34 def api_response ApiResponse.new(@response) end |
#to_h ⇒ Object
Provides the tax_rate resource as a hash of all its readable attributes
39 40 41 |
# File 'lib/gocardless_pro/resources/tax_rate.rb', line 39 def to_h @object end |