Class: OnlinePayments::SDK::Domain::CreateHostedFieldsSessionRequest
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::CreateHostedFieldsSessionRequest
- Defined in:
- lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb
Instance Attribute Summary collapse
-
#locale ⇒ String
The current value of locale.
-
#tokens ⇒ Array<String>
The current value of tokens.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#locale ⇒ String
Returns the current value of locale.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb', line 11 def locale @locale end |
#tokens ⇒ Array<String>
Returns the current value of tokens.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb', line 11 def tokens @tokens end |
Instance Method Details
#from_hash(hash) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb', line 25 def from_hash(hash) super if hash.has_key? 'locale' @locale = hash['locale'] end if hash.has_key? 'tokens' raise TypeError, "value '%s' is not an Array" % [hash['tokens']] unless hash['tokens'].is_a? Array @tokens = [] hash['tokens'].each do |e| @tokens << e end end end |
#to_h ⇒ Hash
18 19 20 21 22 23 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb', line 18 def to_h hash = super hash['locale'] = @locale unless @locale.nil? hash['tokens'] = @tokens unless @tokens.nil? hash end |