Class: OnlinePayments::SDK::Domain::CreateHostedTokenizationResponse
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::CreateHostedTokenizationResponse
- Defined in:
- lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb
Instance Attribute Summary collapse
-
#expired_card_tokens ⇒ Array<String>
The current value of expired_card_tokens.
-
#hosted_tokenization_id ⇒ String
The current value of hosted_tokenization_id.
-
#hosted_tokenization_url ⇒ String
The current value of hosted_tokenization_url.
-
#invalid_tokens ⇒ Array<String>
The current value of invalid_tokens.
-
#partial_redirect_url ⇒ String
The current value of partial_redirect_url.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#expired_card_tokens ⇒ Array<String>
Returns the current value of expired_card_tokens.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb', line 14 def expired_card_tokens @expired_card_tokens end |
#hosted_tokenization_id ⇒ String
Returns the current value of hosted_tokenization_id.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb', line 14 def hosted_tokenization_id @hosted_tokenization_id end |
#hosted_tokenization_url ⇒ String
Returns the current value of hosted_tokenization_url.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb', line 14 def hosted_tokenization_url @hosted_tokenization_url end |
#invalid_tokens ⇒ Array<String>
Returns the current value of invalid_tokens.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb', line 14 def invalid_tokens @invalid_tokens end |
#partial_redirect_url ⇒ String
Returns the current value of partial_redirect_url.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb', line 14 def partial_redirect_url @partial_redirect_url end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb', line 32 def from_hash(hash) super if hash.key? 'expiredCardTokens' raise TypeError, "value '%s' is not an Array" % [hash['expiredCardTokens']] unless hash['expiredCardTokens'].is_a? Array @expired_card_tokens = [] hash['expiredCardTokens'].each do |e| @expired_card_tokens << e end end @hosted_tokenization_id = hash['hostedTokenizationId'] if hash.key? 'hostedTokenizationId' @hosted_tokenization_url = hash['hostedTokenizationUrl'] if hash.key? 'hostedTokenizationUrl' if hash.key? 'invalidTokens' raise TypeError, "value '%s' is not an Array" % [hash['invalidTokens']] unless hash['invalidTokens'].is_a? Array @invalid_tokens = [] hash['invalidTokens'].each do |e| @invalid_tokens << e end end @partial_redirect_url = hash['partialRedirectUrl'] if hash.key? 'partialRedirectUrl' end |
#to_h ⇒ Hash
22 23 24 25 26 27 28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb', line 22 def to_h hash = super hash['expiredCardTokens'] = @expired_card_tokens unless @expired_card_tokens.nil? hash['hostedTokenizationId'] = @hosted_tokenization_id unless @hosted_tokenization_id.nil? hash['hostedTokenizationUrl'] = @hosted_tokenization_url unless @hosted_tokenization_url.nil? hash['invalidTokens'] = @invalid_tokens unless @invalid_tokens.nil? hash['partialRedirectUrl'] = @partial_redirect_url unless @partial_redirect_url.nil? hash end |