Class: SpreeCmCommissioner::Integrations::BookMeBusV1::Resources::WalletPayment
- Inherits:
-
Base
- Object
- Base
- SpreeCmCommissioner::Integrations::BookMeBusV1::Resources::WalletPayment
- Defined in:
- app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#completed_at ⇒ Object
Returns the value of attribute completed_at.
-
#confirmed_at ⇒ Object
Returns the value of attribute confirmed_at.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#id ⇒ Object
Returns the value of attribute id.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#payment_id ⇒ Object
Returns the value of attribute payment_id.
-
#reservation_cart_id ⇒ Object
Returns the value of attribute reservation_cart_id.
-
#status ⇒ Object
Returns the value of attribute status.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
-
#status_description ⇒ Object
Returns the value of attribute status_description.
-
#token ⇒ Object
Returns the value of attribute token.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Methods inherited from Base
from_json_api, from_json_api_item, from_json_api_single, #initialize
Constructor Details
This class inherits a constructor from SpreeCmCommissioner::Integrations::BookMeBusV1::Resources::Base
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def amount @amount end |
#completed_at ⇒ Object
Returns the value of attribute completed_at.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def completed_at @completed_at end |
#confirmed_at ⇒ Object
Returns the value of attribute confirmed_at.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def confirmed_at @confirmed_at end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def created_at @created_at end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def currency_code @currency_code end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def id @id end |
#payment ⇒ Object
Returns the value of attribute payment.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def payment @payment end |
#payment_id ⇒ Object
Returns the value of attribute payment_id.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def payment_id @payment_id end |
#reservation_cart_id ⇒ Object
Returns the value of attribute reservation_cart_id.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def reservation_cart_id @reservation_cart_id end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def status @status end |
#status_code ⇒ Object
Returns the value of attribute status_code.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def status_code @status_code end |
#status_description ⇒ Object
Returns the value of attribute status_description.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def status_description @status_description end |
#token ⇒ Object
Returns the value of attribute token.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def token @token end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 3 def type @type end |
Instance Method Details
#paid? ⇒ Boolean
18 19 20 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 18 def paid? status == 'paid' || status == 'confirmed' || status_code&.to_s == '0' end |
#to_h ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/wallet_payment.rb', line 22 def to_h { 'id' => id, 'token' => token, 'payment_id' => payment_id, 'status' => status, 'status_code' => status_code, 'status_description' => status_description, 'amount' => amount, 'currency_code' => currency_code, 'reservation_cart_id' => reservation_cart_id, 'payment' => payment, 'created_at' => created_at, 'confirmed_at' => confirmed_at, 'completed_at' => completed_at }.compact end |