Sha256: b3f659b71c2c22c1b959464d90371a4cabf69bf81254c25aed759ad81f399dc3

Contents?: true

Size: 599 Bytes

Versions: 2

Compression:

Stored size: 599 Bytes

Contents

# frozen_string_literal: true

# The Refund object contains details about the Refund of a Shipment.
class EasyPost::Refund < EasyPost::Resource
  # Get the next page of refunds.
  def self.get_next_page(collection, page_size = nil)
    get_next_page_exec(method(:all), collection, collection.refunds, page_size)
  end

  # Build the next page parameters.
  def self.build_next_page_params(_collection, current_page_items, page_size = nil)
    params = {}
    params[:before_id] = current_page_items.last.id
    unless page_size.nil?
      params[:page_size] = page_size
    end
    params
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
easypost-4.13.1 lib/easypost/refund.rb
easypost-4.13.0 lib/easypost/refund.rb