class Ittybit::LinksList

def self.from_json(json_object:)

Returns:
  • (Ittybit::LinksList) -

Parameters:
  • json_object (String) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  self_ = parsed_json["self"]
  next_ = parsed_json["next"]
  prev = parsed_json["prev"]
  parent = parsed_json["parent"]
  first = parsed_json["first"]
  last = parsed_json["last"]
  new(
    self_: self_,
    next_: next_,
    prev: prev,
    parent: parent,
    first: first,
    last: last,
    additional_properties: struct
  )
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

Parameters:
  • obj (Object) --
def self.validate_raw(obj:)
  obj.self_&.is_a?(String) != false || raise("Passed value for field obj.self_ is not the expected type, validation failed.")
  obj.next_&.is_a?(String) != false || raise("Passed value for field obj.next_ is not the expected type, validation failed.")
  obj.prev&.is_a?(String) != false || raise("Passed value for field obj.prev is not the expected type, validation failed.")
  obj.parent&.is_a?(String) != false || raise("Passed value for field obj.parent is not the expected type, validation failed.")
  obj.first&.is_a?(String) != false || raise("Passed value for field obj.first is not the expected type, validation failed.")
  obj.last&.is_a?(String) != false || raise("Passed value for field obj.last is not the expected type, validation failed.")
end

def initialize(self_: OMIT, next_: OMIT, prev: OMIT, parent: OMIT, first: OMIT, last: OMIT,

Returns:
  • (Ittybit::LinksList) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • last (String) -- URL for the last page of results.
  • first (String) -- URL for the first page of results.
  • parent (String) -- URL for the parent resource.
  • prev (String) -- URL for the previous page of results.
  • next_ (String) -- URL for the next page of results.
  • self_ (String) -- The absolute URL of the current request, potentially including query parameters.
def initialize(self_: OMIT, next_: OMIT, prev: OMIT, parent: OMIT, first: OMIT, last: OMIT,
               additional_properties: nil)
  @self_ = self_ if self_ != OMIT
  @next_ = next_ if next_ != OMIT
  @prev = prev if prev != OMIT
  @parent = parent if parent != OMIT
  @first = first if first != OMIT
  @last = last if last != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "self": self_,
    "next": next_,
    "prev": prev,
    "parent": parent,
    "first": first,
    "last": last
  }.reject do |_k, v|
    v == OMIT
  end
end

def to_json(*_args)

Returns:
  • (String) -
def to_json(*_args)
  @_field_set&.to_json
end