Class: Pago::V2026_04::Models::CustomerSession
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A customer session that can be used to authenticate as a customer.
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", token: "token", expires_at: "expires_at", return_url: "return_url", customer_portal_url: "customer_portal_url", customer_id: "customer_id", customer: "customer" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "token", "expires_at", "return_url", "customer_portal_url", "customer_id", "customer"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
- #customer ⇒ Object readonly
- #customer_id ⇒ String readonly
- #customer_portal_url ⇒ String readonly
- #expires_at ⇒ String readonly
-
#id ⇒ String
readonly
The ID of the object.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
- #return_url ⇒ String? readonly
- #token ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, token:, expires_at:, return_url:, customer_portal_url:, customer_id:, customer:) ⇒ CustomerSession
constructor
A new instance of CustomerSession.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, token:, expires_at:, return_url:, customer_portal_url:, customer_id:, customer:) ⇒ CustomerSession
Returns a new instance of CustomerSession.
19757 19758 19759 19760 19761 19762 19763 19764 19765 19766 19767 19768 19769 19770 19771 19772 19773 19774 19775 19776 19777 19778 |
# File 'lib/pago/v2026_04/models.rb', line 19757 def initialize( created_at:, modified_at:, id:, token:, expires_at:, return_url:, customer_portal_url:, customer_id:, customer: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:token, token) assign(:expires_at, expires_at) assign(:return_url, return_url) assign(:customer_portal_url, customer_portal_url) assign(:customer_id, customer_id) assign(:customer, customer) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
19729 19730 19731 |
# File 'lib/pago/v2026_04/models.rb', line 19729 def created_at @created_at end |
#customer ⇒ Object (readonly)
19755 19756 19757 |
# File 'lib/pago/v2026_04/models.rb', line 19755 def customer @customer end |
#customer_id ⇒ String (readonly)
19752 19753 19754 |
# File 'lib/pago/v2026_04/models.rb', line 19752 def customer_id @customer_id end |
#customer_portal_url ⇒ String (readonly)
19749 19750 19751 |
# File 'lib/pago/v2026_04/models.rb', line 19749 def customer_portal_url @customer_portal_url end |
#expires_at ⇒ String (readonly)
19743 19744 19745 |
# File 'lib/pago/v2026_04/models.rb', line 19743 def expires_at @expires_at end |
#id ⇒ String (readonly)
The ID of the object.
19737 19738 19739 |
# File 'lib/pago/v2026_04/models.rb', line 19737 def id @id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
19733 19734 19735 |
# File 'lib/pago/v2026_04/models.rb', line 19733 def modified_at @modified_at end |
#return_url ⇒ String? (readonly)
19746 19747 19748 |
# File 'lib/pago/v2026_04/models.rb', line 19746 def return_url @return_url end |
#token ⇒ String (readonly)
19740 19741 19742 |
# File 'lib/pago/v2026_04/models.rb', line 19740 def token @token end |
Class Method Details
.from_json(data) ⇒ CustomerSession?
19782 19783 19784 19785 19786 19787 19788 19789 19790 19791 19792 19793 19794 19795 19796 19797 19798 19799 19800 19801 |
# File 'lib/pago/v2026_04/models.rb', line 19782 def self.from_json(data) data = ::JSON.parse(data) if data.is_a?(String) data = ::Pago::Serde.object(data) return nil if data.nil? wrap_raw( new( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), token: (data.key?("token") ? data["token"] : ::Pago::UNSET), expires_at: (data.key?("expires_at") ? data["expires_at"] : ::Pago::UNSET), return_url: (data.key?("return_url") ? data["return_url"] : ::Pago::UNSET), customer_portal_url: (data.key?("customer_portal_url") ? data["customer_portal_url"] : ::Pago::UNSET), customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET), customer: (data.key?("customer") ? Unions::Customer.from_json(data["customer"]) : ::Pago::UNSET) ), data ) end |