class EasyPost::Batch
Public Class Methods
create_and_buy(params={}, api_key=nil)
click to toggle source
# File lib/easypost/batch.rb, line 2 def self.create_and_buy(params={}, api_key=nil) wrapped_params = {} wrapped_params[self.class_name().to_sym] = params response = EasyPost.make_request(:post, url + '/create_and_buy', api_key, wrapped_params) return EasyPost::Util.convert_to_easypost_object(response, api_key) end
Public Instance Methods
add_shipments(params={})
click to toggle source
# File lib/easypost/batch.rb, line 31 def add_shipments(params={}) response = EasyPost.make_request(:post, url + '/add_shipments', @api_key, params) self.refresh_from(response, @api_key, true) return self end
buy(params={})
click to toggle source
# File lib/easypost/batch.rb, line 10 def buy(params={}) response = EasyPost.make_request(:post, url + '/buy', @api_key, params) self.refresh_from(response, @api_key, true) return self end
create_scan_form(params={})
click to toggle source
# File lib/easypost/batch.rb, line 44 def create_scan_form(params={}) response = EasyPost.make_request(:post, url + '/scan_form', @api_key, params) return response end
label(params={})
click to toggle source
# File lib/easypost/batch.rb, line 17 def label(params={}) response = EasyPost.make_request(:post, url + '/label', @api_key, params) self.refresh_from(response, @api_key, true) return self end
remove_shipments(params={})
click to toggle source
# File lib/easypost/batch.rb, line 24 def remove_shipments(params={}) response = EasyPost.make_request(:post, url + '/remove_shipments', @api_key, params) self.refresh_from(response, @api_key, true) return self end
stamp_and_barcode_by_reference(params={})
click to toggle source
# File lib/easypost/batch.rb, line 38 def stamp_and_barcode_by_reference(params={}) response = EasyPost.make_request(:get, url + '/stamp_and_barcode_by_reference', @api_key, params) return response end