Class: Payhub::Payment
- Inherits:
-
Struct
- Object
- Struct
- Payhub::Payment
- Defined in:
- lib/payhub/types.rb
Instance Attribute Summary collapse
-
#amount_minor ⇒ Object
Returns the value of attribute amount_minor.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#hosted_checkout_url ⇒ Object
Returns the value of attribute hosted_checkout_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#merchant_order_ref ⇒ Object
Returns the value of attribute merchant_order_ref.
-
#next_action ⇒ Object
Returns the value of attribute next_action.
-
#psp ⇒ Object
Returns the value of attribute psp.
-
#psp_ref ⇒ Object
Returns the value of attribute psp_ref.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Attribute Details
#amount_minor ⇒ Object
Returns the value of attribute amount_minor
6 7 8 |
# File 'lib/payhub/types.rb', line 6 def amount_minor @amount_minor end |
#currency ⇒ Object
Returns the value of attribute currency
6 7 8 |
# File 'lib/payhub/types.rb', line 6 def currency @currency end |
#hosted_checkout_url ⇒ Object
Returns the value of attribute hosted_checkout_url
6 7 8 |
# File 'lib/payhub/types.rb', line 6 def hosted_checkout_url @hosted_checkout_url end |
#id ⇒ Object
Returns the value of attribute id
6 7 8 |
# File 'lib/payhub/types.rb', line 6 def id @id end |
#merchant_order_ref ⇒ Object
Returns the value of attribute merchant_order_ref
6 7 8 |
# File 'lib/payhub/types.rb', line 6 def merchant_order_ref @merchant_order_ref end |
#next_action ⇒ Object
Returns the value of attribute next_action
6 7 8 |
# File 'lib/payhub/types.rb', line 6 def next_action @next_action end |
#psp ⇒ Object
Returns the value of attribute psp
6 7 8 |
# File 'lib/payhub/types.rb', line 6 def psp @psp end |
#psp_ref ⇒ Object
Returns the value of attribute psp_ref
6 7 8 |
# File 'lib/payhub/types.rb', line 6 def psp_ref @psp_ref end |
#status ⇒ Object
Returns the value of attribute status
6 7 8 |
# File 'lib/payhub/types.rb', line 6 def status @status end |
Class Method Details
.from_raw(raw) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/payhub/types.rb', line 11 def self.from_raw(raw) new( id: raw["id"].to_s, status: raw["status"].to_s, psp: raw["psp"].to_s, psp_ref: raw["psp_ref"], next_action: Payhub::NextAction.decode(raw["next_action"]), amount_minor: raw["amount_minor"].to_i, currency: raw["currency"].to_s, merchant_order_ref: raw["merchant_order_ref"].to_s, hosted_checkout_url: raw["hosted_checkout_url"] ) end |