Class: TranslationCms::Api::CustomerNotification
- Inherits:
-
JsonApiClient::Resource
- Object
- JsonApiClient::Resource
- TranslationCms::Api::CustomerNotification
- Defined in:
- lib/translation_cms/api/customer_notification.rb
Instance Method Summary collapse
- #any? ⇒ Boolean
- #discounts? ⇒ Boolean
- #discounts_lifetime? ⇒ Boolean
- #discounts_personal? ⇒ Boolean
- #issues? ⇒ Boolean
- #orders? ⇒ Boolean
- #orders_canceled? ⇒ Boolean
- #orders_completed? ⇒ Boolean
- #orders_payments? ⇒ Boolean
- #orders_processing? ⇒ Boolean
Instance Method Details
#any? ⇒ Boolean
6 7 8 |
# File 'lib/translation_cms/api/customer_notification.rb', line 6 def any? unread_total_count > 0 end |
#discounts? ⇒ Boolean
36 37 38 |
# File 'lib/translation_cms/api/customer_notification.rb', line 36 def discounts? discounts > 0 end |
#discounts_lifetime? ⇒ Boolean
44 45 46 |
# File 'lib/translation_cms/api/customer_notification.rb', line 44 def discounts_lifetime? discount_lifetime > 0 end |
#discounts_personal? ⇒ Boolean
40 41 42 |
# File 'lib/translation_cms/api/customer_notification.rb', line 40 def discounts_personal? discount_personal > 0 end |
#issues? ⇒ Boolean
32 33 34 |
# File 'lib/translation_cms/api/customer_notification.rb', line 32 def issues? > 0 end |
#orders? ⇒ Boolean
10 11 12 13 14 |
# File 'lib/translation_cms/api/customer_notification.rb', line 10 def orders? ( > 0) || (translator_assigned > 0) || (order_canceled > 0) || (order_completed > 0) || (order_full_refund > 0) || (order_partial_refund > 0) end |
#orders_canceled? ⇒ Boolean
24 25 26 |
# File 'lib/translation_cms/api/customer_notification.rb', line 24 def orders_canceled? order_canceled > 0 end |
#orders_completed? ⇒ Boolean
20 21 22 |
# File 'lib/translation_cms/api/customer_notification.rb', line 20 def orders_completed? order_completed > 0 end |
#orders_payments? ⇒ Boolean
28 29 30 |
# File 'lib/translation_cms/api/customer_notification.rb', line 28 def orders_payments? (order_full_refund > 0) || (order_partial_refund > 0) end |
#orders_processing? ⇒ Boolean
16 17 18 |
# File 'lib/translation_cms/api/customer_notification.rb', line 16 def orders_processing? ( > 0) || (translator_assigned > 0) end |