Class: RubyNative::IAP::Event
- Inherits:
-
Object
- Object
- RubyNative::IAP::Event
- Defined in:
- lib/ruby_native/iap/event.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#expires_date ⇒ Object
readonly
Returns the value of attribute expires_date.
-
#notification_uuid ⇒ Object
readonly
Returns the value of attribute notification_uuid.
-
#original_transaction_id ⇒ Object
readonly
Returns the value of attribute original_transaction_id.
-
#owner_token ⇒ Object
readonly
Returns the value of attribute owner_token.
-
#product_id ⇒ Object
readonly
Returns the value of attribute product_id.
-
#purchase_date ⇒ Object
readonly
Returns the value of attribute purchase_date.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#success_path ⇒ Object
readonly
Returns the value of attribute success_path.
-
#transaction_id ⇒ Object
readonly
Returns the value of attribute transaction_id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #active? ⇒ Boolean
- #canceled? ⇒ Boolean
- #created? ⇒ Boolean
- #expired? ⇒ Boolean
-
#initialize(type:, status:, owner_token:, product_id:, original_transaction_id:, transaction_id:, purchase_date:, expires_date:, environment:, notification_uuid:, success_path:) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(type:, status:, owner_token:, product_id:, original_transaction_id:, transaction_id:, purchase_date:, expires_date:, environment:, notification_uuid:, success_path:) ⇒ Event
Returns a new instance of Event.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ruby_native/iap/event.rb', line 9 def initialize(type:, status:, owner_token:, product_id:, original_transaction_id:, transaction_id:, purchase_date:, expires_date:, environment:, notification_uuid:, success_path:) @type = type @status = status @owner_token = owner_token @product_id = product_id @original_transaction_id = original_transaction_id @transaction_id = transaction_id @purchase_date = purchase_date @expires_date = expires_date @environment = environment @notification_uuid = notification_uuid @success_path = success_path end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def environment @environment end |
#expires_date ⇒ Object (readonly)
Returns the value of attribute expires_date.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def expires_date @expires_date end |
#notification_uuid ⇒ Object (readonly)
Returns the value of attribute notification_uuid.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def notification_uuid @notification_uuid end |
#original_transaction_id ⇒ Object (readonly)
Returns the value of attribute original_transaction_id.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def original_transaction_id @original_transaction_id end |
#owner_token ⇒ Object (readonly)
Returns the value of attribute owner_token.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def owner_token @owner_token end |
#product_id ⇒ Object (readonly)
Returns the value of attribute product_id.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def product_id @product_id end |
#purchase_date ⇒ Object (readonly)
Returns the value of attribute purchase_date.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def purchase_date @purchase_date end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def status @status end |
#success_path ⇒ Object (readonly)
Returns the value of attribute success_path.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def success_path @success_path end |
#transaction_id ⇒ Object (readonly)
Returns the value of attribute transaction_id.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def transaction_id @transaction_id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/ruby_native/iap/event.rb', line 4 def type @type end |
Instance Method Details
#active? ⇒ Boolean
25 26 27 |
# File 'lib/ruby_native/iap/event.rb', line 25 def active? status == "active" end |
#canceled? ⇒ Boolean
37 38 39 |
# File 'lib/ruby_native/iap/event.rb', line 37 def canceled? type == "subscription.canceled" end |
#created? ⇒ Boolean
33 34 35 |
# File 'lib/ruby_native/iap/event.rb', line 33 def created? type == "subscription.created" end |
#expired? ⇒ Boolean
29 30 31 |
# File 'lib/ruby_native/iap/event.rb', line 29 def expired? status == "expired" end |