Class: AGCOD::GiftCardActivity
- Inherits:
-
Object
- Object
- AGCOD::GiftCardActivity
- Defined in:
- lib/aws_agcod/gift_card_activity_list.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#card_number ⇒ Object
readonly
Returns the value of attribute card_number.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#gc_id ⇒ Object
readonly
Returns the value of attribute gc_id.
-
#partner_id ⇒ Object
readonly
Returns the value of attribute partner_id.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(payload) ⇒ GiftCardActivity
constructor
A new instance of GiftCardActivity.
- #is_real? ⇒ Boolean
Constructor Details
#initialize(payload) ⇒ GiftCardActivity
Returns a new instance of GiftCardActivity.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 10 def initialize(payload) @payload = payload @status = payload['activityStatus'] @created_at = payload['activityTime'] @type = payload['activityType'] @card_number = payload['cardNumber'] @amount = payload['cardValue']['amount'] if payload['cardValue'] @error_code = payload['failureCode'] @gc_id = payload['gcId'] @partner_id = payload['partnerId'] @request_id = payload['requestId'] end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
7 8 9 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 7 def amount @amount end |
#card_number ⇒ Object (readonly)
Returns the value of attribute card_number.
7 8 9 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 7 def card_number @card_number end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 7 def created_at @created_at end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
7 8 9 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 7 def error_code @error_code end |
#gc_id ⇒ Object (readonly)
Returns the value of attribute gc_id.
7 8 9 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 7 def gc_id @gc_id end |
#partner_id ⇒ Object (readonly)
Returns the value of attribute partner_id.
7 8 9 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 7 def partner_id @partner_id end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
7 8 9 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 7 def request_id @request_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 7 def status @status end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 7 def type @type end |
Instance Method Details
#is_real? ⇒ Boolean
23 24 25 |
# File 'lib/aws_agcod/gift_card_activity_list.rb', line 23 def is_real? @payload['isRealOp'] == 'true' end |