Posts

Showing posts from April, 2022

What is Enhanced Object Literal in Javascript?

Enhanced object literals, also known as ES6 object literals. it is  set of new features introduced in ES2015 that make it easier to create and work with objects in JavaScript. Here are some of the key features of enhanced object literals: Concise property initialization:  You can now initialize object properties using a more concise syntax, especially when the variable names match the property names you want to assign.   For example: // ES5 code var name = 'John Doe'; var age = 30; var person = {   name: name,   age: age }; // ES6 code const name = 'John Doe'; const age = 30; const person = { name, age }; Computed property names:  You can now use expressions as property names, making it easier to create dynamic objects.   For example: // ES5 code var key = 'name'; var obj = {}; obj[key] = 'John Doe'; // ES6 code const key = 'name'; const obj = { [key]: 'John Doe' }; Method shorthand:  You can now define methods directly in object literals

Stripe Connect Custom Onboarding

 Hello Everyone,     If you want to create a custom connect account with stripe api then here is the code for you.     I have written this code for business_type "individual" only.     You can see the required field for the business type "company" in the below link.     Api link to create stripe connect account const account = await stripe . accounts . create ({       type : "custom" ,       country : "US" ,       capabilities : {         card_payments : { requested : true },         transfers : { requested : true },       },       business_type : "individual" ,       external_account : {         object : "bank_account" ,         country : "US" ,         currency : "usd" ,         routing_number : "110000000" ,         account_number : "000123456789" ,       },       tos_acceptance : { date : new Date (), ip : "8.8.8.8" },       business_profile :