Class: Raas::UnregisterCreditCardResponseModel
- Defined in:
- lib/raas/models/unregister_credit_card_response_model.rb
Overview
Represents the response from the unregister credit card call
Instance Attribute Summary collapse
-
#created_date ⇒ DateTime
The date the card was removed.
-
#message ⇒ String
A message describing the status of the card.
-
#token ⇒ String
The credit card token.
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.
Instance Method Summary collapse
-
#initialize(created_date = nil, message = nil, token = nil) ⇒ UnregisterCreditCardResponseModel
constructor
A new instance of UnregisterCreditCardResponseModel.
Methods inherited from BaseModel
Constructor Details
#initialize(created_date = nil, message = nil, token = nil) ⇒ UnregisterCreditCardResponseModel
Returns a new instance of UnregisterCreditCardResponseModel.
29 30 31 32 33 34 35 |
# File 'lib/raas/models/unregister_credit_card_response_model.rb', line 29 def initialize(created_date = nil, = nil, token = nil) @created_date = created_date @message = @token = token end |
Instance Attribute Details
#created_date ⇒ DateTime
The date the card was removed
10 11 12 |
# File 'lib/raas/models/unregister_credit_card_response_model.rb', line 10 def created_date @created_date end |
#message ⇒ String
A message describing the status of the card
14 15 16 |
# File 'lib/raas/models/unregister_credit_card_response_model.rb', line 14 def @message end |
#token ⇒ String
The credit card token
18 19 20 |
# File 'lib/raas/models/unregister_credit_card_response_model.rb', line 18 def token @token end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/raas/models/unregister_credit_card_response_model.rb', line 38 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. created_date = APIHelper.rfc3339(hash['createdDate']) if hash['createdDate'] = hash['message'] token = hash['token'] # Create object from extracted values. UnregisterCreditCardResponseModel.new(created_date, , token) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 27 |
# File 'lib/raas/models/unregister_credit_card_response_model.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['created_date'] = 'createdDate' @_hash['message'] = 'message' @_hash['token'] = 'token' @_hash end |