@@ -106,28 +106,28 @@ patch = patch_api.ApiClient(api_key=os.environ.get('SANDBOX_API_KEY'))
106
106
107
107
# Create an estimate
108
108
mass_g = 1_000_000 # Pass in the mass in grams (i.e. 1 metric tonne)
109
- patch.estimates.create_estimate (mass_g = mass_g)
109
+ patch.estimates.create_mass_estimate (mass_g = mass_g)
110
110
111
111
# # You can also specify a project-id field (optional) to be used instead of the preferred one
112
112
project_id = ' pro_test_1234' # Pass in the project's ID
113
- patch.estimates.create_estimate (mass_g = mass_g, project_id = project_id)
113
+ patch.estimates.create_mass_estimate (mass_g = mass_g, project_id = project_id)
114
114
115
115
# Create a flight estimate
116
116
distance_m = 1_000_000 # Pass in the distance traveled in meters
117
- patch.estimates.create_estimate (distance_m = distance_m)
117
+ patch.estimates.create_mass_estimate (distance_m = distance_m)
118
118
119
119
# Create a shipping estimate
120
120
distance_m = 1_000_000 # Pass in the distance traveled in meters
121
121
transportation_method = " rail"
122
122
package_mass_g = 5000
123
- patch.estimates.create_estimate (distance_m = distance_m, transportation_method = transportation_method, package_mass_g = package_mass_g)
123
+ patch.estimates.create_mass_estimate (distance_m = distance_m, transportation_method = transportation_method, package_mass_g = package_mass_g)
124
124
125
125
# Create a vehicle estimate
126
126
distance_m = 1_000_000 # Pass in the distance traveled in meters
127
127
make = " Toyota"
128
128
model = " Corolla"
129
129
year = 1995
130
- patch.estimates.create_estimate (distance_m = distance_m, make = make, model = model, year = year)
130
+ patch.estimates.create_mass_estimate (distance_m = distance_m, make = make, model = model, year = year)
131
131
132
132
# Retrieve an estimate
133
133
estimate_id = ' est_test_1234'
0 commit comments