Class: Worldline::Connect::SDK::V1::Domain::FindPaymentsResponse
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::FindPaymentsResponse
- Defined in:
- lib/worldline/connect/sdk/v1/domain/find_payments_response.rb
Instance Attribute Summary collapse
-
#limit ⇒ Integer
The current value of limit.
-
#offset ⇒ Integer
The current value of offset.
-
#payments ⇒ Array<Worldline::Connect::SDK::V1::Domain::Payment>
The current value of payments.
-
#total_count ⇒ Integer
The current value of total_count.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#limit ⇒ Integer
Returns the current value of limit.
17 18 19 |
# File 'lib/worldline/connect/sdk/v1/domain/find_payments_response.rb', line 17 def limit @limit end |
#offset ⇒ Integer
Returns the current value of offset.
17 18 19 |
# File 'lib/worldline/connect/sdk/v1/domain/find_payments_response.rb', line 17 def offset @offset end |
#payments ⇒ Array<Worldline::Connect::SDK::V1::Domain::Payment>
Returns the current value of payments.
17 18 19 |
# File 'lib/worldline/connect/sdk/v1/domain/find_payments_response.rb', line 17 def payments @payments end |
#total_count ⇒ Integer
Returns the current value of total_count.
17 18 19 |
# File 'lib/worldline/connect/sdk/v1/domain/find_payments_response.rb', line 17 def total_count @total_count end |
Instance Method Details
#from_hash(hash) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/worldline/connect/sdk/v1/domain/find_payments_response.rb', line 37 def from_hash(hash) super if hash.has_key? 'limit' @limit = hash['limit'] end if hash.has_key? 'offset' @offset = hash['offset'] end if hash.has_key? 'payments' raise TypeError, "value '%s' is not an Array" % [hash['payments']] unless hash['payments'].is_a? Array @payments = [] hash['payments'].each do |e| @payments << Worldline::Connect::SDK::V1::Domain::Payment.new_from_hash(e) end end if hash.has_key? 'totalCount' @total_count = hash['totalCount'] end end |
#to_h ⇒ Hash
28 29 30 31 32 33 34 35 |
# File 'lib/worldline/connect/sdk/v1/domain/find_payments_response.rb', line 28 def to_h hash = super hash['limit'] = @limit unless @limit.nil? hash['offset'] = @offset unless @offset.nil? hash['payments'] = @payments.collect{|val| val.to_h} unless @payments.nil? hash['totalCount'] = @total_count unless @total_count.nil? hash end |