Skip to content

Commit 9aca81f

Browse files
committed
Fix: Removed unnecessary parameters and standardized ruleset_name across all examples
1 parent e4afc6e commit 9aca81f

File tree

24 files changed

+121
-142
lines changed

24 files changed

+121
-142
lines changed

official/docs/csharp/current/luma/buy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static async Task Main()
1616

1717
shipment = await client.Shipment.BuyLuma(
1818
"shp_...",
19-
rulesetName: "ruleset_name",
19+
rulesetName: "ruleset_...",
2020
plannedShipDate: "2025-07-18",
2121
deliverByDate: "2025-07-20"
2222
);

official/docs/csharp/current/luma/one-call-buy.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ public static async Task Main()
4444
Height = 5,
4545
Weight = 65.9
4646
},
47-
CarrierAccounts = new List<string> { "ca_..." },
4847
PersistLabel = true,
49-
RulesetName = "required_deliver_by_date",
48+
RulesetName = "ruleset_...",
5049
PlannedShipDate = "2025-07-18",
51-
DeliverByDate = "2025-07-20",
52-
Insurance = "50.00"
50+
DeliverByDate = "2025-07-20"
5351
};
5452

5553
EasyPost.Models.API.Shipment shipment = await client.Shipment.CreateAndBuyLuma(parameters);

official/docs/csharp/current/luma/promise.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static async Task Main()
4444
Height = 5,
4545
Weight = 65.9
4646
},
47-
RulesetName = "test_ruleset_deliver_by_2",
47+
RulesetName = "ruleset_...",
4848
PlannedShipDate = "2025-07-18",
4949
DeliverByDate = "2025-07-20"
5050
};

official/docs/curl/current/luma/buy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ curl -X POST https://api.easypost.com/v2/shipments/shp_.../luma \
22
-u "EASYPOST_API_KEY": \
33
-H 'Content-Type: application/json' \
44
-d '{
5-
"ruleset_name": "ruleset_name",
6-
"planned_ship_date": "YYYY-MM-DD"
5+
"ruleset_name": ""ruleset_..."",
6+
"planned_ship_date": "YYYY-MM-DD",
77
"deliver_by_date": "YYYY-MM-DD"
88
}'

official/docs/curl/current/luma/one-call-buy.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ curl -X POST https://api.easypost.com/v2/shipments/luma \
3030
"height": "5",
3131
"weight": "65.9"
3232
},
33-
"carrier_accounts": ["ca_1", "ca_2"],
34-
"persist_label": true,
35-
"ruleset_name": "required_deliver_by_date",
33+
"persist_label": true,
34+
"ruleset_name": "ruleset_...",
3635
"planned_ship_date": "2025-05-14",
37-
"deliver_by_date": "2025-05-16",
38-
"insurance": "50.00"
36+
"deliver_by_date": "2025-05-16"
3937
}
4038
}'

official/docs/curl/current/luma/promise.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ curl -X POST 'https://api.easypost.com/v2/luma/promise' \
3030
"height": "5",
3131
"weight": "65.9"
3232
},
33-
"ruleset_name": "test_ruleset_deliver_by_2",
33+
"ruleset_name": "ruleset_...",
3434
"planned_ship_date": "2025-07-03",
35-
"deliver_by_date": "2025-07-06",
35+
"deliver_by_date": "2025-07-06"
3636
}
3737
}'
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
package example
22

33
import (
4-
"fmt"
4+
"fmt"
55

6-
"github.com/EasyPost/easypost-go/v5"
6+
"github.com/EasyPost/easypost-go/v5"
77
)
88

99
func buy() {
10-
client := easypost.New("EASYPOST_API_KEY")
10+
client := easypost.New("EASYPOST_API_KEY")
1111

12-
shipment, _ := client.GetShipment("shp_...")
13-
lumaRequest := &easypost.LumaRequest{
14-
Shipment: easypost.Shipment{ID: shipment.ID},
15-
RulesetName: "ruleset_...",
16-
PlannedShipDate: "2025-07-21",
17-
DeliverByDate: "2025-07-25",
18-
PersistLabel: false,
19-
}
12+
shipment, _ := client.GetShipment("shp_...")
13+
lumaRequest := &easypost.LumaRequest{
14+
Shipment: easypost.Shipment{ID: shipment.ID},
15+
RulesetName: "ruleset_...",
16+
PlannedShipDate: "2025-07-21",
17+
DeliverByDate: "2025-07-25",
18+
PersistLabel: false,
19+
}
2020

21-
shipment, _ = client.BuyLumaShipment(shipment.ID, lumaRequest)
21+
shipment, _ = client.BuyLumaShipment(shipment.ID, lumaRequest)
2222

23-
fmt.Println(shipment)
23+
fmt.Println(shipment)
2424
}
Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,51 @@
11
package example
22

33
import (
4-
"fmt"
4+
"fmt"
55

6-
"github.com/EasyPost/easypost-go/v5"
6+
"github.com/EasyPost/easypost-go/v5"
77
)
88

99
func oneCallBuy() {
10-
client := easypost.New("EASYPOST_API_KEY")
10+
client := easypost.New("EASYPOST_API_KEY")
1111

12-
lumaRequest := &easypost.LumaRequest{
13-
Shipment: easypost.Shipment{
14-
CarrierAccountIDs: []string{"ca_..."},
15-
Service: "NextDayAir",
16-
Parcel: &easypost.Parcel{
17-
Length: 20.2,
18-
Width: 10.9,
19-
Height: 5,
20-
Weight: 65.9,
21-
},
22-
ToAddress: &easypost.Address{
23-
Name: "Dr. Steve Brule",
24-
Street1: "179 N Harbor Dr",
25-
City: "Redondo Beach",
26-
State: "CA",
27-
Zip: "90277",
28-
Country: "US",
29-
Phone: "4155559999",
30-
Email: "dr_steve_brule@gmail.com",
31-
},
32-
FromAddress: &easypost.Address{
33-
Name: "EasyPost",
34-
Street1: "417 Montgomery Street",
35-
Street2: "5th Floor",
36-
City: "San Francisco",
37-
State: "CA",
38-
Zip: "90277",
39-
Country: "US",
40-
Phone: "4155559999",
41-
Email: "support@easypost.com",
42-
},
43-
Reference: "ShipmentRef",
44-
},
45-
RulesetName: "ruleset_...",
46-
PlannedShipDate: "2025-07-21",
47-
DeliverByDate: "2025-07-25",
48-
PersistLabel: false,
49-
}
12+
lumaRequest := &easypost.LumaRequest{
13+
Shipment: easypost.Shipment{
14+
Parcel: &easypost.Parcel{
15+
Length: 20.2,
16+
Width: 10.9,
17+
Height: 5,
18+
Weight: 65.9,
19+
},
20+
ToAddress: &easypost.Address{
21+
Name: "Dr. Steve Brule",
22+
Street1: "179 N Harbor Dr",
23+
City: "Redondo Beach",
24+
State: "CA",
25+
Zip: "90277",
26+
Country: "US",
27+
Phone: "4155559999",
28+
Email: "dr_steve_brule@gmail.com",
29+
},
30+
FromAddress: &easypost.Address{
31+
Name: "EasyPost",
32+
Street1: "417 Montgomery Street",
33+
Street2: "5th Floor",
34+
City: "San Francisco",
35+
State: "CA",
36+
Zip: "90277",
37+
Country: "US",
38+
Phone: "4155559999",
39+
Email: "support@easypost.com",
40+
},
41+
},
42+
RulesetName: "ruleset_...",
43+
PlannedShipDate: "2025-07-21",
44+
DeliverByDate: "2025-07-25",
45+
PersistLabel: false,
46+
}
5047

51-
shipment, _ := client.CreateAndBuyLumaShipment(lumaRequest)
48+
shipment, _ := client.CreateAndBuyLumaShipment(lumaRequest)
5249

53-
fmt.Println(shipment)
50+
fmt.Println(shipment)
5451
}
Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,51 @@
11
package example
22

33
import (
4-
"fmt"
4+
"fmt"
55

6-
"github.com/EasyPost/easypost-go/v5"
6+
"github.com/EasyPost/easypost-go/v5"
77
)
88

99
func getPromise() {
10-
client := easypost.New("EASYPOST_API_KEY")
10+
client := easypost.New("EASYPOST_API_KEY")
1111

12-
lumaRequest := &easypost.LumaRequest{
13-
Shipment: easypost.Shipment{
14-
CarrierAccountIDs: []string{"ca_..."},
15-
Service: "NextDayAir",
16-
Parcel: &easypost.Parcel{
17-
Length: 20.2,
18-
Width: 10.9,
19-
Height: 5,
20-
Weight: 65.9,
21-
},
22-
ToAddress: &easypost.Address{
23-
Name: "Dr. Steve Brule",
24-
Street1: "179 N Harbor Dr",
25-
City: "Redondo Beach",
26-
State: "CA",
27-
Zip: "90277",
28-
Country: "US",
29-
Phone: "4155559999",
30-
Email: "dr_steve_brule@gmail.com",
31-
},
32-
FromAddress: &easypost.Address{
33-
Name: "EasyPost",
34-
Street1: "417 Montgomery Street",
35-
Street2: "5th Floor",
36-
City: "San Francisco",
37-
State: "CA",
38-
Zip: "90277",
39-
Country: "US",
40-
Phone: "4155559999",
41-
Email: "support@easypost.com",
42-
},
43-
Reference: "ShipmentRef",
44-
},
45-
RulesetName: "ruleset_...",
46-
PlannedShipDate: "2025-07-21",
47-
DeliverByDate: "2025-07-25",
48-
PersistLabel: false,
49-
}
12+
lumaRequest := &easypost.LumaRequest{
13+
Shipment: easypost.Shipment{
14+
Parcel: &easypost.Parcel{
15+
Length: 20.2,
16+
Width: 10.9,
17+
Height: 5,
18+
Weight: 65.9,
19+
},
20+
ToAddress: &easypost.Address{
21+
Name: "Dr. Steve Brule",
22+
Street1: "179 N Harbor Dr",
23+
City: "Redondo Beach",
24+
State: "CA",
25+
Zip: "90277",
26+
Country: "US",
27+
Phone: "4155559999",
28+
Email: "dr_steve_brule@gmail.com",
29+
},
30+
FromAddress: &easypost.Address{
31+
Name: "EasyPost",
32+
Street1: "417 Montgomery Street",
33+
Street2: "5th Floor",
34+
City: "San Francisco",
35+
State: "CA",
36+
Zip: "90277",
37+
Country: "US",
38+
Phone: "4155559999",
39+
Email: "support@easypost.com",
40+
},
41+
},
42+
RulesetName: "ruleset_...",
43+
PlannedShipDate: "2025-07-21",
44+
DeliverByDate: "2025-07-25",
45+
PersistLabel: false,
46+
}
5047

51-
lumaInfo, _ := client.GetLumaPromise(lumaRequest)
48+
lumaInfo, _ := client.GetLumaPromise(lumaRequest)
5249

53-
fmt.Println(lumaInfo)
50+
fmt.Println(lumaInfo)
5451
}

official/docs/java/current/luma/buy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static void main(String[] args) throws EasyPostException {
1111
EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY");
1212

1313
HashMap<String, Object> params = new HashMap<String, Object>();
14-
params.put("ruleset_name", "ruleset_name");
14+
params.put("ruleset_name", "ruleset_...");
1515
params.put("planned_ship_date", "2025-07-18");
1616
params.put("deliver_by_date", "2025-07-20");
1717

0 commit comments

Comments
 (0)