Guest User

Untitled

a guest
Apr 19th, 2018
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. using MundiAPI.PCL;
  2. using MundiAPI.PCL.Models;
  3. using System.Collections.Generic;
  4.  
  5. namespace TutorialAssinatura {
  6. class Program {
  7. static void Main(string[] args) {
  8.  
  9. string basicAuthUserName = "sk_test_39joaPCZQFyxA8zx";
  10. // Senha em branco. Passando apenas a secret key
  11. string basicAuthPassword = "";
  12.  
  13. var client = new MundiAPIClient(basicAuthUserName, basicAuthPassword);
  14.  
  15. var customer = new CreateCustomerRequest() {
  16. Name = "Gustavo Fonseca",
  17. Email = "Gustavo.fonseca@mundipagg.com"
  18. };
  19.  
  20. var request = new CreatePlanRequest {
  21. Name = "Plano Gold",
  22. PaymentMethods = new List<string>() { "credit_card","boleto"},
  23. Items = new List<CreatePlanItemRequest> {
  24. new CreatePlanItemRequest {
  25. Name = "Musculação",
  26. Quantity = 1,
  27. PricingScheme = new CreatePricingSchemeRequest {
  28. Price = 18990
  29. }
  30. }
  31. }
  32. };
  33.  
  34. var response = client.Plans.CreatePlan(request);
  35.  
  36. }
  37. }
  38. }
Add Comment
Please, Sign In to add comment