Sha256: 4d7f924d51b6a796d8b2ae8997d85746386a6142bfec9eccb00c52b0b166b8ac
Contents?: true
Size: 614 Bytes
Versions: 17
Compression:
Stored size: 614 Bytes
Contents
module EasyPost class Pickup < Resource def buy(params={}) if params.instance_of?(EasyPost::PickupRate) temp = params.clone params = {} params[:carrier] = temp.carrier params[:service] = temp.service end response, api_key = EasyPost.request(:post, url + '/buy', @api_key, params) self.refresh_from(response, @api_key, true) return self end def cancel(params={}) response, api_key = EasyPost.request(:post, url + '/cancel', @api_key, params) self.refresh_from(response, @api_key, true) return self end end end
Version data entries
17 entries across 17 versions & 1 rubygems