Sha256: 2bf8253d48c6497e384d12be4079e1b5dc26d944849a84000145a3284a566c3f
Contents?: true
Size: 1.44 KB
Versions: 4
Compression:
Stored size: 1.44 KB
Contents
module EasyPost class Batch < Resource def self.create_and_buy(params={}) wrapped_params = {} wrapped_params[self.class_name().to_sym] = params response, api_key = EasyPost.request(:post, url + '/create_and_buy', @api_key, wrapped_params) return Util.convert_to_easypost_object(response, api_key) end def buy(params={}) response, api_key = EasyPost.request(:post, url + '/buy', @api_key, params) self.refresh_from(response, @api_key, true) return self end def label(params={}) response, api_key = EasyPost.request(:post, url + '/label', @api_key, params) self.refresh_from(response, @api_key, true) return self end def remove_shipments(params={}) response, api_key = EasyPost.request(:post, url + '/remove_shipments', @api_key, params) self.refresh_from(response, @api_key, true) return self end def add_shipments(params={}) response, api_key = EasyPost.request(:post, url + '/add_shipments', @api_key, params) self.refresh_from(response, @api_key, true) return self end def stamp_and_barcode_by_reference(params={}) response, api_key = EasyPost.request(:get, url + '/stamp_and_barcode_by_reference', @api_key, params) return response end def create_scan_form(params={}) response, api_key = EasyPost.request(:post, url + '/scan_form', @api_key, params) return response end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
easypost-2.0.12 | lib/easypost/batch.rb |
easypost-2.0.11 | lib/easypost/batch.rb |
easypost-2.0.10 | lib/easypost/batch.rb |
easypost-2.0.9 | lib/easypost/batch.rb |