github.com/mundipagg/boleto-api@v0.0.0-20230620145841-3f9ec742599f/citibank/stub.go (about) 1 package citibank 2 3 import ( 4 "time" 5 6 "github.com/mundipagg/boleto-api/models" 7 "github.com/mundipagg/boleto-api/test" 8 ) 9 10 const day = time.Hour * 24 11 12 type stubBoletoRequestCitibank struct { 13 test.StubBoletoRequest 14 } 15 16 func newStubBoletoRequestCitibank() *stubBoletoRequestCitibank { 17 expirationDate := time.Now().Add(5 * day) 18 19 base := test.NewStubBoletoRequest(models.Caixa) 20 s := &stubBoletoRequestCitibank{ 21 StubBoletoRequest: *base, 22 } 23 24 s.Agreement = models.Agreement{ 25 AgreementNumber: 123456, 26 Agency: "1234", 27 } 28 29 s.Title = models.Title{ 30 ExpireDateTime: expirationDate, 31 ExpireDate: expirationDate.Format("2006-01-02"), 32 OurNumber: 12345678901234, 33 AmountInCents: 200, 34 DocumentNumber: "1234567890A", 35 Instructions: "Campo de instruções - max 40 caracteres", 36 BoletoType: "OUT", 37 BoletoTypeCode: "99", 38 } 39 40 s.Recipient = models.Recipient{ 41 Document: models.Document{ 42 Type: "CNPJ", 43 Number: "12123123000112", 44 }, 45 } 46 47 s.Buyer = models.Buyer{ 48 Name: "Willian Jadson Bezerra Menezes Tupinambá", 49 Document: models.Document{ 50 Type: "CPF", 51 Number: "12312312312", 52 }, 53 } 54 return s 55 }