Method: Bitpesa::Pagination#initialize
- Defined in:
- lib/bitpesa-sdk/models/pagination.rb
#initialize(attributes = {}) ⇒ Pagination
Initializes the object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/bitpesa-sdk/models/pagination.rb', line 56 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'current_page') self.current_page = attributes[:'current_page'] end if attributes.has_key?(:'next_page') self.next_page = attributes[:'next_page'] end if attributes.has_key?(:'prev_page') self.prev_page = attributes[:'prev_page'] end if attributes.has_key?(:'total_pages') self.total_pages = attributes[:'total_pages'] end if attributes.has_key?(:'total_count') self.total_count = attributes[:'total_count'] end end |