Sha256: 3ce2834ab66c238effd83eae6184d8c493f599180de282a8cc9f0802fe72dc33
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 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 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
easypost-2.0.5 | lib/easypost/batch.rb |