#bart-terminal-go

1 messages · Page 1 of 1 (latest)

hushed sirenBOT
timber kettle
#

bart-terminal-go

#

Hey @earnest star! That's just a picture of code. What's incomplete and wrong? what's the problem?

earnest star
#

The docs on stripe are always incomplete or just plain wrong, ive reported like 4 problems with the docs that are getting fixed and this is another one

timber kettle
#

Sure, let's focus on the issue and clearly explaining the problem instead of pictures

#

what is the bug?

earnest star
#

this is the error

#

the code given in the docs is incomplete

timber kettle
#

which version of stripe-go are you on?

earnest star
#

latest version

timber kettle
#

can you share which exact version you are on please?

earnest star
timber kettle
#

okay so you aren't on the latest at all right? that one is multiple years old

#

we released 74.0.0 just yesterday

#

and we switched to go modules at least 2 years ago

#

I'm trying locally though to see what's wrong with that code

#

yeah I just tried that exact code on v74 and it works fine

#

I think you might be hitting a problem because you're on such an old version of the library because it's before go modules and so most of the examples don't work for you

#

does that make sense @earnest star ?

earnest star
#

I mean i dont really think thats the version im using

#

cuss it works now

#

i fixed the code

#

wait no i used a diffrent doc one sec

#

nvm you were right, when i pulled the github docs it pulled the old version

timber kettle
#

yeah it's because you're before go modules

#

so you're stuck before v72.0.0 when we switched to go modules

earnest star
#

thank you i fixed it

#

but one more thing

#

how can i set the connected account id?

timber kettle
#

I'm sorry but I'll be a pain: do not send picture. You're a dev, I'm a dev, I want text here. Because then I can tweak the text and show you

earnest star
#

I figured it out, the docs are just incomplete or miss alot of stuff

#

testing rn

#
        DisplayName: stripe.String("92805"),
        Address: &stripe.AddressParams{
            Line1:      stripe.String("932 N East Wood"),
            City:       stripe.String("Fullerton"),
            State:      stripe.String("California"),
            Country:    stripe.String("US"),
            PostalCode: stripe.String("92805"),
        },
    }
    params.AddMetadata("connected_account", "123123123")

    result, err := location.New(params)
    if err != nil {
        fmt.Println(err)
    }
    fmt.Println(result)```
#

i get returned &{{0xc000066480} 0xc000066420 false 92805 tml_E3NiVw3Ve7bcHf false map[connected_account:123123123] terminal.location}

untold berry
#

Hi 👋

What is it you are trying to do here?

earnest star
#

oh got it the meta data one seemed similar thank you

untold berry
#

Yeah, Metadata is used to attach data in key:value pairs to many Stripe objects but it's just data. It doesn't assign other Connect Accounts or anything