Skip to content

Commit

Permalink
Merge pull request #75 from scramjetorg/fix/Integration
Browse files Browse the repository at this point in the history
Fix/integration
  • Loading branch information
alicja-gruzdz committed Jun 21, 2023
2 parents 860710e + 5be4f2d commit ca4de40
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/Auth0/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"api_url" : "<your api url>",
"request_data" : {"client_id":"<your client id>","client_secret":"<your client secret>","audience":"<your audience>","grant_type":"client_credentials"}

}
}
13 changes: 10 additions & 3 deletions python/Stripe/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,25 @@

def get_mail(user):
return user['data']['object']['email']

def get_fullname(user):
return user['data']['object']['name']
mail = user['data']['object']['email']
name = mail.split("@")
name = name[0] + " stripe"
return name

async def get_event(stream):
await asyncio.sleep(3)
compared = stripe.Event.list(type="customer.created")['data'][-1]
stream.write(compared['data']['object']['email'])
tako = stripe.Event.list(type="customer.created")['data']

stream.write(get_mail(compared)+ " " +get_fullname(compared))
compared = compared['id']
while True:
test = stripe.Event.list(type="customer.created", ending_before=compared, limit=3)['data']

for i in range(len(test)):
stream.write(get_mail(test[i])+" "+get_fullname(test[i]))
stream.write(get_mail(test[i]) + " " +get_fullname(test[i]))
if len(test) != 0:
compared = test[0]['id']
await asyncio.sleep(3)
Expand Down

0 comments on commit ca4de40

Please sign in to comment.