Class: TrueTrial::Types::Cancellation
- Inherits:
-
Object
- Object
- TrueTrial::Types::Cancellation
- Defined in:
- lib/truetrial/types/cancellation.rb
Overview
Represents a cancellation returned from the TrueTrial API.
Instance Attribute Summary collapse
-
#cancelled_by ⇒ Object
readonly
Returns the value of attribute cancelled_by.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#notes ⇒ Object
readonly
Returns the value of attribute notes.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Cancellation
Builds a Cancellation from an API response hash.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Cancellation
constructor
A new instance of Cancellation.
Constructor Details
#initialize(attributes = {}) ⇒ Cancellation
Returns a new instance of Cancellation.
10 11 12 13 14 15 16 17 18 |
# File 'lib/truetrial/types/cancellation.rb', line 10 def initialize(attributes = {}) @id = attributes["id"] @order_id = attributes["order_id"] @reason = attributes["reason"] @cancelled_by = attributes["cancelled_by"] @notes = attributes["notes"] @created_at = attributes["created_at"] @updated_at = attributes["updated_at"] end |
Instance Attribute Details
#cancelled_by ⇒ Object (readonly)
Returns the value of attribute cancelled_by.
7 8 9 |
# File 'lib/truetrial/types/cancellation.rb', line 7 def cancelled_by @cancelled_by end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/truetrial/types/cancellation.rb', line 7 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/truetrial/types/cancellation.rb', line 7 def id @id end |
#notes ⇒ Object (readonly)
Returns the value of attribute notes.
7 8 9 |
# File 'lib/truetrial/types/cancellation.rb', line 7 def notes @notes end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
7 8 9 |
# File 'lib/truetrial/types/cancellation.rb', line 7 def order_id @order_id end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
7 8 9 |
# File 'lib/truetrial/types/cancellation.rb', line 7 def reason @reason end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
7 8 9 |
# File 'lib/truetrial/types/cancellation.rb', line 7 def updated_at @updated_at end |
Class Method Details
.from_hash(hash) ⇒ Cancellation
Builds a Cancellation from an API response hash.
24 25 26 |
# File 'lib/truetrial/types/cancellation.rb', line 24 def self.from_hash(hash) new(hash) end |