Layer 231
OnrampAvailabilityObj
Availability of buying cryptocurrency through an on-ramp provider for the current user.
constructor
onrampAvailability#f9c84973 flags:# allowed:flags.0?true buy_allowed:flags.1?true country_code:string state:flags.2?string methods:Vector<OnrampMethodAvailability> = OnrampAvailability;
Parameters
| Name | Type | Description |
|---|---|---|
| Allowed | flags.0?true | Whether the provider can be used in the user's region |
| BuyAllowed | flags.1?true | Whether buying is allowed |
| CountryCode | string | Detected country code of the user |
| State | flags.2?string | Detected state or region of the user |
| Methods | Vector<OnrampMethodAvailability> | Availability of each payment method |
Returns
OnrampAvailabilityGogram Example
// Creating OnrampAvailabilityObj constructor obj := &tg.OnrampAvailabilityObj{ CountryCode: "12345", Methods: []tg.OnrampMethodAvailability{&tg.OnrampMethodAvailabilityObj{}}, // Optional fields: // Allowed: true, // BuyAllowed: true, // State: "example", }