Skip to content

Commit

Permalink
Merge pull request #123 from EasyPost/remove_env_vars_snippets
Browse files Browse the repository at this point in the history
remove env vars snippets
  • Loading branch information
Justintime50 authored Mar 14, 2024
2 parents a848eec + ef7ce23 commit a073139
Show file tree
Hide file tree
Showing 2,352 changed files with 2,422 additions and 4,188 deletions.
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ GEM

PLATFORMS
arm64-darwin-22
arm64-darwin-23
x86_64-darwin-21
x86_64-linux

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/addresses/create-and-verify.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.Address.Create parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/addresses/create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.Address.Create parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/addresses/list.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.Address.All parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/addresses/retrieve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Address address = await client.Address.Retrieve("adr_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/addresses/verify-failure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.Address.Create parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/addresses/verify-param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.Address.Create parameters = new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.Address.Create parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/addresses/verify.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.Address.Create parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/api-keys/retrieve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

// Retrieve all API keys including children
List<ApiKey> apiKeys = await client.ApiKey.All();
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/batches/add-shipments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Shipment shipment = await client.Shipment.Retrieve("shp_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/batches/buy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Batch batch = await client.Batch.Retrieve("batch_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/batches/create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Shipment shipment = await client.Shipment.Retrieve("shp_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/batches/label.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Batch batch = await client.Batch.Retrieve("batch_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/batches/list.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.Batch.All parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/batches/remove-shipments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Shipment shipment = await client.Shipment.Retrieve("shp_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/batches/retrieve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Batch batch = await client.Batch.Retrieve("batch_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/batches/scan-forms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Batch batch = await client.Batch.Retrieve("batch_...");

Expand Down
8 changes: 2 additions & 6 deletions official/docs/csharp/current/billing/create-ep-credit-card.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;
var client = new EasyPost.Client("EASYPOST_API_KEY");

var client = new EasyPost.Client(apiKey);

string referralUserApiKey = Environment.GetEnvironmentVariable("REFERRAL_USER_API_KEY")!;

PaymentMethod paymentMethod = await client.ReferralCustomer.AddCreditCardToUser(referralUserApiKey, "0123456789101234", "01", "2025", "111", PaymentMethod.Priority.Primary);
PaymentMethod paymentMethod = await client.ReferralCustomer.AddCreditCardToUser("REFERRAL_USER_API_KEY", "0123456789101234", "01", "2025", "111", PaymentMethod.Priority.Primary);

Console.WriteLine(JsonConvert.SerializeObject(referralUser, Formatting.Indented));
}
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/billing/delete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

await client.Billing.DeletePaymentMethod(PaymentMethod.Priority.Primary);
}
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/billing/fund.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

await client.Billing.FundWallet("2000", PaymentMethod.Priority.Primary);
}
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/billing/list.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

PaymentMethodsSummary paymentMethodsSummary = await client.Billing.RetrievePaymentMethodsSummary();

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/brand/update.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

User user = await client.User.RetrieveMe();

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/carrier-accounts/create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.CarrierAccount.Create parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/carrier-accounts/delete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

CarrierAccount carrierAccount = await client.CarrierAccount.Retrieve("ca_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/carrier-accounts/list.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

List<CarrierAccount> carrierAccounts = await client.CarrierAccount.All();

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/carrier-accounts/retrieve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

CarrierAccount carrierAccount = await client.CarrierAccount.Retrieve("ca_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/carrier-accounts/update.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

CarrierAccount carrierAccount = await client.CarrierAccount.Retrieve("ca_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/carrier-metadata/retrieve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

// Request all metadata for all carriers
List<Carrier> carrierMetadata = await client.CarrierMetadata.Retrieve();
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/carrier-types/list.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

List<CarrierType> carrierTypes = await client.CarrierType.All();

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/child-users/create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.User.CreateChild parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/child-users/delete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

User user = await client.User.Retrieve("user_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/child-users/list.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.Users.AllChildren parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/customs-infos/create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.CustomsInfo.Create parameters = new()
{
Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/customs-infos/retrieve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

CustomsInfo customsInfo = await client.CustomsInfo.Retrieve("cstinfo_...");

Expand Down
4 changes: 1 addition & 3 deletions official/docs/csharp/current/customs-items/create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public class Examples
{
public static async Task Main()
{
string apiKey = Environment.GetEnvironmentVariable("EASYPOST_API_KEY")!;

var client = new EasyPost.Client(apiKey);
var client = new EasyPost.Client("EASYPOST_API_KEY");

Parameters.CustomsItems.Create parameters = new()
{
Expand Down
Loading

0 comments on commit a073139

Please sign in to comment.