Sha256: 842bf3dc05d81c9afb3b25900cf537cd320f1338a1a91a0d89a2eb68f8fb1fe9
Contents?: true
Size: 725 Bytes
Versions: 2
Compression:
Stored size: 725 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 = EasyPost.make_request(:post, url + '/buy', @api_key, params) self.refresh_from(response, @api_key, true) return self end def cancel(params={}) response = EasyPost.make_request(:post, url + '/cancel', @api_key, params) self.refresh_from(response, @api_key, true) return self end def self.all(filters={}, api_key=nil) raise NotImplementedError.new('Pickup.all not implemented.') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
easypost-3.1.4 | lib/easypost/pickup.rb |
easypost-3.1.3 | lib/easypost/pickup.rb |