Class: FlexOps::Resources::UspsCarrier
- Inherits:
-
Object
- Object
- FlexOps::Resources::UspsCarrier
- Defined in:
- lib/flexops/resources/carriers.rb
Constant Summary collapse
- PROXY =
"/api/ApiProxy"
Instance Method Summary collapse
- #cancel_domestic_label ⇒ Object
- #cancel_international_label ⇒ Object
- #cancel_pickup ⇒ Object
- #city_state_lookup(zip_code) ⇒ Object
- #create_domestic_label(body) ⇒ Object
- #create_international_label(body) ⇒ Object
- #create_pickup(body) ⇒ Object
- #create_return_label(body) ⇒ Object
- #create_scan_form(body) ⇒ Object
- #delivery_standards(params) ⇒ Object
- #find_drop_off_locations(params) ⇒ Object
- #find_post_offices(params) ⇒ Object
- #get_domestic_prices(body) ⇒ Object
- #get_domestic_products(body) ⇒ Object
- #get_domestic_rates(body) ⇒ Object
- #get_international_prices(body) ⇒ Object
- #get_international_rates(body) ⇒ Object
-
#initialize(http) ⇒ UspsCarrier
constructor
A new instance of UspsCarrier.
- #track_detail(params) ⇒ Object
- #track_summary(params) ⇒ Object
- #validate_address(params) ⇒ Object
- #zip_code_lookup(params) ⇒ Object
Constructor Details
#initialize(http) ⇒ UspsCarrier
Returns a new instance of UspsCarrier.
26 27 28 |
# File 'lib/flexops/resources/carriers.rb', line 26 def initialize(http) @http = http end |
Instance Method Details
#cancel_domestic_label ⇒ Object
41 |
# File 'lib/flexops/resources/carriers.rb', line 41 def cancel_domestic_label = @http.delete("#{PROXY}/api/v3/Shipping/cancelUspsDomesticShipmentLabel") |
#cancel_international_label ⇒ Object
42 |
# File 'lib/flexops/resources/carriers.rb', line 42 def cancel_international_label = @http.delete("#{PROXY}/api/v3/Shipping/cancelUspsInternationalShipmentLabel") |
#cancel_pickup ⇒ Object
46 |
# File 'lib/flexops/resources/carriers.rb', line 46 def cancel_pickup = @http.delete("#{PROXY}/api/v3/CarrierPickup/cancelUspsCarrierPickupSchedule") |
#city_state_lookup(zip_code) ⇒ Object
31 |
# File 'lib/flexops/resources/carriers.rb', line 31 def city_state_lookup(zip_code) = @http.get("#{PROXY}/api/v3/AddressValidation/getUspsCityStateLookupByZipCode", query: { zipCode: zip_code }) |
#create_domestic_label(body) ⇒ Object
38 |
# File 'lib/flexops/resources/carriers.rb', line 38 def create_domestic_label(body) = @http.post("#{PROXY}/api/v3/Shipping/postUspsGenerateDomesticShippingLabel", body: body) |
#create_international_label(body) ⇒ Object
40 |
# File 'lib/flexops/resources/carriers.rb', line 40 def create_international_label(body) = @http.post("#{PROXY}/api/v3/Shipping/postUspsGenerateInternationalShippingLabel", body: body) |
#create_pickup(body) ⇒ Object
45 |
# File 'lib/flexops/resources/carriers.rb', line 45 def create_pickup(body) = @http.post("#{PROXY}/api/v3/CarrierPickup/postUspsCreateCarrierPickupSchedule", body: body) |
#create_return_label(body) ⇒ Object
39 |
# File 'lib/flexops/resources/carriers.rb', line 39 def create_return_label(body) = @http.post("#{PROXY}/api/v3/Shipping/postUspsGenerateDomesticReturnsShippingLabel", body: body) |
#create_scan_form(body) ⇒ Object
47 |
# File 'lib/flexops/resources/carriers.rb', line 47 def create_scan_form(body) = @http.post("#{PROXY}/api/v3/ScanForm/postUspsCreateScanFormLabelShipment", body: body) |
#delivery_standards(params) ⇒ Object
48 |
# File 'lib/flexops/resources/carriers.rb', line 48 def delivery_standards(params) = @http.get("#{PROXY}/api/v3/ServiceStandards/getUspsGetDeliveryStandardsEstimates", query: params) |
#find_drop_off_locations(params) ⇒ Object
49 |
# File 'lib/flexops/resources/carriers.rb', line 49 def find_drop_off_locations(params) = @http.get("#{PROXY}/api/v3/LocationSearch/getUspsFindValidDropOffLocations", query: params) |
#find_post_offices(params) ⇒ Object
50 |
# File 'lib/flexops/resources/carriers.rb', line 50 def find_post_offices(params) = @http.get("#{PROXY}/api/v3/LocationSearch/getUspsFindValidPostOfficeLocations", query: params) |
#get_domestic_prices(body) ⇒ Object
35 |
# File 'lib/flexops/resources/carriers.rb', line 35 def get_domestic_prices(body) = @http.post("#{PROXY}/api/v3/RateCalculator/postUspsSearchEligibleDomesticPrices", body: body) |
#get_domestic_products(body) ⇒ Object
34 |
# File 'lib/flexops/resources/carriers.rb', line 34 def get_domestic_products(body) = @http.post("#{PROXY}/api/v3/RateCalculator/postUspsSearchEligibleDomesticProducts", body: body) |
#get_domestic_rates(body) ⇒ Object
33 |
# File 'lib/flexops/resources/carriers.rb', line 33 def get_domestic_rates(body) = @http.post("#{PROXY}/api/v3/RateCalculator/postUspsSearchDomesticBaseRates", body: body) |
#get_international_prices(body) ⇒ Object
37 |
# File 'lib/flexops/resources/carriers.rb', line 37 def get_international_prices(body) = @http.post("#{PROXY}/api/v3/RateCalculator/postUspsSearchEligibleInternationalPrices", body: body) |
#get_international_rates(body) ⇒ Object
36 |
# File 'lib/flexops/resources/carriers.rb', line 36 def get_international_rates(body) = @http.post("#{PROXY}/api/v3/RateCalculator/postUspsSearchInternationalBaseRates", body: body) |
#track_detail(params) ⇒ Object
44 |
# File 'lib/flexops/resources/carriers.rb', line 44 def track_detail(params) = @http.get("#{PROXY}/api/v3/Tracking/getUspsTrackingDetailInformation", query: params) |
#track_summary(params) ⇒ Object
43 |
# File 'lib/flexops/resources/carriers.rb', line 43 def track_summary(params) = @http.get("#{PROXY}/api/v3/Tracking/getUspsTrackingSummaryInformation", query: params) |
#validate_address(params) ⇒ Object
30 |
# File 'lib/flexops/resources/carriers.rb', line 30 def validate_address(params) = @http.get("#{PROXY}/api/v3/AddressValidation/getUspsValidateAndCorrectAddress", query: params) |
#zip_code_lookup(params) ⇒ Object
32 |
# File 'lib/flexops/resources/carriers.rb', line 32 def zip_code_lookup(params) = @http.get("#{PROXY}/api/v3/AddressValidation/getUspsZipCodeLookupByAddress", query: params) |