Class: NewStoreApi::SessionTokenResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::SessionTokenResponse
- Defined in:
- lib/new_store_api/models/session_token_response.rb
Overview
SessionTokenResponse Model.
Instance Attribute Summary collapse
-
#embedded_processor ⇒ String
TODO: Write general description for this method.
-
#payment_method_types ⇒ Array[String]
TODO: Write general description for this method.
-
#provider_location_id ⇒ String
TODO: Write general description for this method.
-
#secret ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(embedded_processor = nil, provider_location_id = nil, secret = nil, payment_method_types = SKIP) ⇒ SessionTokenResponse
constructor
A new instance of SessionTokenResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(embedded_processor = nil, provider_location_id = nil, secret = nil, payment_method_types = SKIP) ⇒ SessionTokenResponse
Returns a new instance of SessionTokenResponse.
52 53 54 55 56 57 58 |
# File 'lib/new_store_api/models/session_token_response.rb', line 52 def initialize( = nil, provider_location_id = nil, secret = nil, payment_method_types = SKIP) @embedded_processor = @payment_method_types = payment_method_types unless payment_method_types == SKIP @provider_location_id = provider_location_id @secret = secret end |
Instance Attribute Details
#embedded_processor ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/new_store_api/models/session_token_response.rb', line 14 def @embedded_processor end |
#payment_method_types ⇒ Array[String]
TODO: Write general description for this method
18 19 20 |
# File 'lib/new_store_api/models/session_token_response.rb', line 18 def payment_method_types @payment_method_types end |
#provider_location_id ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/new_store_api/models/session_token_response.rb', line 22 def provider_location_id @provider_location_id end |
#secret ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/new_store_api/models/session_token_response.rb', line 26 def secret @secret end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/new_store_api/models/session_token_response.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash.key?('embedded_processor') ? hash['embedded_processor'] : nil provider_location_id = hash.key?('provider_location_id') ? hash['provider_location_id'] : nil secret = hash.key?('secret') ? hash['secret'] : nil payment_method_types = hash.key?('payment_method_types') ? hash['payment_method_types'] : SKIP # Create object from extracted values. SessionTokenResponse.new(, provider_location_id, secret, payment_method_types) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/new_store_api/models/session_token_response.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['embedded_processor'] = 'embedded_processor' @_hash['payment_method_types'] = 'payment_method_types' @_hash['provider_location_id'] = 'provider_location_id' @_hash['secret'] = 'secret' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 49 50 |
# File 'lib/new_store_api/models/session_token_response.rb', line 46 def self.nullables %w[ payment_method_types ] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 |
# File 'lib/new_store_api/models/session_token_response.rb', line 39 def self.optionals %w[ payment_method_types ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
89 90 91 92 93 94 |
# File 'lib/new_store_api/models/session_token_response.rb', line 89 def inspect class_name = self.class.name.split('::').last "<#{class_name} embedded_processor: #{@embedded_processor.inspect}, payment_method_types:"\ " #{@payment_method_types.inspect}, provider_location_id: #{@provider_location_id.inspect},"\ " secret: #{@secret.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
81 82 83 84 85 86 |
# File 'lib/new_store_api/models/session_token_response.rb', line 81 def to_s class_name = self.class.name.split('::').last "<#{class_name} embedded_processor: #{@embedded_processor}, payment_method_types:"\ " #{@payment_method_types}, provider_location_id: #{@provider_location_id}, secret:"\ " #{@secret}>" end |