class EasyPost::Services::ScanForm
Public Instance Methods
Source
# File lib/easypost/services/scan_form.rb, line 21 def all(params = {}) filters = { key: 'scan_forms' } get_all_helper('scan_forms', MODEL_CLASS, params, filters) end
Retrieve a list of ScanForms
Source
# File lib/easypost/services/scan_form.rb, line 7 def create(params = {}) response = @client.make_request(:post, 'scan_forms', params) EasyPost::InternalUtilities::Json.convert_json_to_object(response, MODEL_CLASS) end
Create a ScanForm
.
Source
# File lib/easypost/services/scan_form.rb, line 28 def get_next_page(collection, page_size = nil) raise EasyPost::Errors::EndOfPaginationError.new unless more_pages?(collection) params = { before_id: collection.scan_forms.last.id } params[:page_size] = page_size unless page_size.nil? all(params) end
Get the next page of ScanForms.
Source
# File lib/easypost/services/scan_form.rb, line 14 def retrieve(id) response = @client.make_request(:get, "scan_forms/#{id}") EasyPost::InternalUtilities::Json.convert_json_to_object(response, MODEL_CLASS) end
Retrieve a ScanForm
.