lib/friendly_shipping/services/usps.rb in friendly_shipping-0.6.5 vs lib/friendly_shipping/services/usps.rb in friendly_shipping-0.7.0
- old
+ new
@@ -14,11 +14,11 @@
require 'friendly_shipping/services/usps/rate_estimate_options'
module FriendlyShipping
module Services
class Usps
- include Dry::Monads::Result::Mixin
+ include Dry::Monads[:result]
attr_reader :test, :login, :client
CARRIER = FriendlyShipping::Carrier.new(
id: 'usps',
@@ -109,9 +109,10 @@
private
def build_request(api:, xml:, debug:)
FriendlyShipping::Request.new(
url: base_url,
+ http_method: "POST",
body: "API=#{RESOURCES[api]}&XML=#{CGI.escape xml}",
readable_body: xml,
debug: debug
)
end