ConsumerApi

<back to all web services

VippsLoginCallbackRequest

Consumer
The following routes are available for this service:
GET/vipps/login/callback

library ConsumerApi;
import 'package:servicestack/servicestack.dart';

enum VippsAddressType
{
    Home,
    Work,
    Other,
}

class VippsAddress implements IConvertible
{
    VippsAddressType? addressType;
    String? country;
    String? formatted;
    String? postalCode;
    String? region;
    String? streetAddress;

    VippsAddress({this.addressType,this.country,this.formatted,this.postalCode,this.region,this.streetAddress});
    VippsAddress.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        addressType = JsonConverters.fromJson(json['addressType'],'VippsAddressType',context!);
        country = json['country'];
        formatted = json['formatted'];
        postalCode = json['postalCode'];
        region = json['region'];
        streetAddress = json['streetAddress'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'addressType': JsonConverters.toJson(addressType,'VippsAddressType',context!),
        'country': country,
        'formatted': formatted,
        'postalCode': postalCode,
        'region': region,
        'streetAddress': streetAddress
    };

    getTypeName() => "VippsAddress";
    TypeContext? context = _ctx;
}

class VippsUserInfo implements IConvertible
{
    VippsAddress? address;
    DateTime? birthdate;
    String? email;
    bool? emailVerified;
    String? familyName;
    String? givenName;
    String? name;
    String? phoneNumber;
    String? sessionIdentifier;
    String? subjectIdentifier;

    VippsUserInfo({this.address,this.birthdate,this.email,this.emailVerified,this.familyName,this.givenName,this.name,this.phoneNumber,this.sessionIdentifier,this.subjectIdentifier});
    VippsUserInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        address = JsonConverters.fromJson(json['address'],'VippsAddress',context!);
        birthdate = JsonConverters.fromJson(json['birthdate'],'DateTime',context!);
        email = json['email'];
        emailVerified = json['emailVerified'];
        familyName = json['familyName'];
        givenName = json['givenName'];
        name = json['name'];
        phoneNumber = json['phoneNumber'];
        sessionIdentifier = json['sessionIdentifier'];
        subjectIdentifier = json['subjectIdentifier'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'address': JsonConverters.toJson(address,'VippsAddress',context!),
        'birthdate': JsonConverters.toJson(birthdate,'DateTime',context!),
        'email': email,
        'emailVerified': emailVerified,
        'familyName': familyName,
        'givenName': givenName,
        'name': name,
        'phoneNumber': phoneNumber,
        'sessionIdentifier': sessionIdentifier,
        'subjectIdentifier': subjectIdentifier
    };

    getTypeName() => "VippsUserInfo";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: <String, TypeInfo> {
    'VippsAddressType': TypeInfo(TypeOf.Enum, enumValues:VippsAddressType.values),
    'VippsAddress': TypeInfo(TypeOf.Class, create:() => VippsAddress()),
    'VippsUserInfo': TypeInfo(TypeOf.Class, create:() => VippsUserInfo()),
});

Dart VippsLoginCallbackRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /vipps/login/callback HTTP/1.1 
Host: unstable-consumer-api.brovs.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"vippsUserInfo":{"address":{"addressType":"Home","country":"String","formatted":"String","postalCode":"String","region":"String","streetAddress":"String"},"birthdate":"0001-01-01T00:00:00.0000000+00:00","email":"String","emailVerified":false,"familyName":"String","givenName":"String","name":"String","phoneNumber":"String","sessionIdentifier":"String","subjectIdentifier":"String"},"nextRelativeUrl":"String"}