Class: Sunpass::Transaction
- Inherits:
-
Data
- Object
- Data
- Sunpass::Transaction
- Defined in:
- lib/sunpass/models.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
-
#occurred_on ⇒ Object
readonly
Returns the value of attribute occurred_on.
-
#raw_text ⇒ Object
readonly
Returns the value of attribute raw_text.
Class Method Summary collapse
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount
6 7 8 |
# File 'lib/sunpass/models.rb', line 6 def amount @amount end |
#description ⇒ Object (readonly)
Returns the value of attribute description
6 7 8 |
# File 'lib/sunpass/models.rb', line 6 def description @description end |
#external_id ⇒ Object (readonly)
Returns the value of attribute external_id
6 7 8 |
# File 'lib/sunpass/models.rb', line 6 def external_id @external_id end |
#occurred_on ⇒ Object (readonly)
Returns the value of attribute occurred_on
6 7 8 |
# File 'lib/sunpass/models.rb', line 6 def occurred_on @occurred_on end |
#raw_text ⇒ Object (readonly)
Returns the value of attribute raw_text
6 7 8 |
# File 'lib/sunpass/models.rb', line 6 def raw_text @raw_text end |
Class Method Details
.build(occurred_on:, amount:, description:, raw_text:) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/sunpass/models.rb', line 13 def self.build(occurred_on:, amount:, description:, raw_text:) new( external_id: Digest::SHA256.hexdigest(description), occurred_on: occurred_on, amount: amount, description: description, raw_text: raw_text ) end |