Class: Subsify::Token
- Inherits:
-
Object
- Object
- Subsify::Token
- Defined in:
- lib/subsify/token.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#customer_ip ⇒ Object
readonly
Returns the value of attribute customer_ip.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#merchant_ip ⇒ Object
readonly
Returns the value of attribute merchant_ip.
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#vat ⇒ Object
readonly
Returns the value of attribute vat.
Instance Method Summary collapse
-
#initialize(data) ⇒ Token
constructor
A new instance of Token.
- #vat? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ Token
Returns a new instance of Token.
5 6 7 8 9 10 11 12 |
# File 'lib/subsify/token.rb', line 5 def initialize(data) @id = data['id'] @country = data['country'] @vat = data['vat'] @customer_ip = data['customer_ip'] @merchant_ip = data['merchant_ip'] @plan = Plan.new(data['plan']) if data['plan'] end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
4 5 6 |
# File 'lib/subsify/token.rb', line 4 def country @country end |
#customer_ip ⇒ Object (readonly)
Returns the value of attribute customer_ip.
4 5 6 |
# File 'lib/subsify/token.rb', line 4 def customer_ip @customer_ip end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/subsify/token.rb', line 4 def id @id end |
#merchant_ip ⇒ Object (readonly)
Returns the value of attribute merchant_ip.
4 5 6 |
# File 'lib/subsify/token.rb', line 4 def merchant_ip @merchant_ip end |
#plan ⇒ Object (readonly)
Returns the value of attribute plan.
4 5 6 |
# File 'lib/subsify/token.rb', line 4 def plan @plan end |
#vat ⇒ Object (readonly)
Returns the value of attribute vat.
4 5 6 |
# File 'lib/subsify/token.rb', line 4 def vat @vat end |
Instance Method Details
#vat? ⇒ Boolean
14 15 16 |
# File 'lib/subsify/token.rb', line 14 def vat? @vat end |