Class: Portage::Ucp::PaymentMethodRef
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::PaymentMethodRef
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
Portage extension (app.portage-ucp.payment_method) — an opaque PSP-issued reference only, never a raw PAN or the payment_token itself (§9/§16).
Instance Attribute Summary collapse
-
#brand ⇒ Object
readonly
Returns the value of attribute brand.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last4 ⇒ Object
readonly
Returns the value of attribute last4.
-
#psp_reference ⇒ Object
readonly
Returns the value of attribute psp_reference.
Instance Method Summary collapse
-
#initialize(id:, psp_reference:, brand: nil, last4: nil, expires_at: nil, created_at: nil) ⇒ PaymentMethodRef
constructor
A new instance of PaymentMethodRef.
- #to_wire_h ⇒ Object
Constructor Details
#initialize(id:, psp_reference:, brand: nil, last4: nil, expires_at: nil, created_at: nil) ⇒ PaymentMethodRef
Returns a new instance of PaymentMethodRef.
579 |
# File 'lib/portage/ucp/value_objects.rb', line 579 def initialize(id:, psp_reference:, brand: nil, last4: nil, expires_at: nil, created_at: nil) = super |
Instance Attribute Details
#brand ⇒ Object (readonly)
Returns the value of attribute brand
578 579 580 |
# File 'lib/portage/ucp/value_objects.rb', line 578 def brand @brand end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at
578 579 580 |
# File 'lib/portage/ucp/value_objects.rb', line 578 def created_at @created_at end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at
578 579 580 |
# File 'lib/portage/ucp/value_objects.rb', line 578 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id
578 579 580 |
# File 'lib/portage/ucp/value_objects.rb', line 578 def id @id end |
#last4 ⇒ Object (readonly)
Returns the value of attribute last4
578 579 580 |
# File 'lib/portage/ucp/value_objects.rb', line 578 def last4 @last4 end |
#psp_reference ⇒ Object (readonly)
Returns the value of attribute psp_reference
578 579 580 |
# File 'lib/portage/ucp/value_objects.rb', line 578 def psp_reference @psp_reference end |
Instance Method Details
#to_wire_h ⇒ Object
581 582 583 584 |
# File 'lib/portage/ucp/value_objects.rb', line 581 def to_wire_h { "id" => id, "psp_reference" => psp_reference, "brand" => brand, "last4" => last4, "expires_at" => expires_at, "created_at" => created_at }.compact end |