Create class

Serializer to create an account via a REST API.

Temporary to allow for legacy behaviour where uplifts do not count towards quoted amounts, which is potentially only OEGB behaviour.

Constructors

Create({String? accountReference, required AccountType accountType, Affiliate? affiliate, required Address billingAddress, BillingOptions? billingOptions, BrandCode? brandCode, Business? business, Deposit? deposit, List<ElectricityMeterPoint>? electricityMeterPoints, List<GasMeterPoint>? gasMeterPoints, required bool isChangeOfTenancy, List<Metadata>? metadata, Payment? payment, DateTime? preferredSsd, Address? previousBillingAddress, String? promoRewardCode, String? quoteCode, String? quoteRequestCode, required String reference, String? referralCode, bool? requiresPostalComms, SalesChannel? salesChannel, String? salesSubchannel, String? signupRewardCode, SmartMeterInterest? smartMeterInterest, SmartMeterReadPermission? smartMeterReadPermission, SmartOnboardingProductType? smartOnboardingProductType, DateTime? soldAt, required AccountSource source, required List<User> users})
Create.fromJson(Map<String, dynamic> json)
factory

Properties

accountReference String?
A unique reference to previous external account number or similar account identifier.
getter/setter pair
accountType AccountType
getter/setter pair
affiliate Affiliate?
getter/setter pair
billingAddress Address
getter/setter pair
billingOptions BillingOptions?
Billing options for the account.
getter/setter pair
brandCode BrandCode?
A code to specify the account should be for a particular brand.
getter/setter pair
business Business?
getter/setter pair
deposit Deposit?
getter/setter pair
electricityMeterPoints List<ElectricityMeterPoint>?
At least one electricity or gas meter-point must be included. A maximum of two electricity and one gas meter-point can be included. All meter-points must be based in the Great Britain. All meter-points must belong to the same address. For an electricity meter-point, at least one of 'mpan' or 'address' must be included. At least one of 'consumption_standard' (standard tariff) or a combination of 'consumption_day' and 'consumption_night' (two-rate tariff) or 'consumption_day', 'consumption_night' and 'consumption_off_peak' (three-rate tariff) must be included depending on the type of tariff specified.
getter/setter pair
gasMeterPoints List<GasMeterPoint>?
At least one electricity or gas meter-point must be included. A maximum of two electricity and one gas meter-point can be included. All meter-points must be based in the Great Britain. All meter-points must belong to the same address. For a gas meter-point, at least one of 'mprn' or 'address' must be included, as well as 'consumption_standard'.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isChangeOfTenancy bool
Whether this account is a change of tenancy at the property.
getter/setter pair
metadata List<Metadata>?
An array of key value pairs for storing generic metadata relating to an account.
getter/setter pair
payment Payment?
The payment details are required when using the method 'MONTHLY_DIRECT_DEBIT' but are optional if all the meters are of type PREPAYMENT'. The 'MONTHLY_DIRECT_PAYMENT' method is not available to all users.
getter/setter pair
preferredSsd DateTime?
A preferred supply start date.
getter/setter pair
previousBillingAddress Address?
getter/setter pair
promoRewardCode String?
A promotional code that will be applied to the account.
getter/setter pair
quoteCode String?
The code of an existing legacy quote created using the legacy 'CreatQuote' mutation as part of the join supplier journey for this new customer. If the quote was generated as part of an affiliate session, the affiliate link and any query parameters belonging to the session will be associated with the created account. Note: only one of 'quote_code' and 'quote_request_code' should be provided in the input.
getter/setter pair
quoteRequestCode String?
The code of an existing quote created using the 'QuoteNewMeterPoints' mutation as part of the join supplier journey for this new customer. If the quote was generated as part of an affiliate session, the affiliate link and any query parameters belonging to the session will be associated with the created account. Note: only one of 'quote_code' and 'quote_request_code' should be provided in the input.
getter/setter pair
reference String
A unique partner reference.
getter/setter pair
referralCode String?
The referral code of an existing account linked to a Kraken referral scheme.
getter/setter pair
requiresPostalComms bool?
Communication delivery preference
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
salesChannel SalesChannel?
getter/setter pair
salesSubchannel String?
An optional segmentation of the sales channel, e.g. the names of the specific price comparison site, or the telesales organisation.
getter/setter pair
signupRewardCode String?
getter/setter pair
smartMeterInterest SmartMeterInterest?
The occupier’s interest in installing a smart meter.
getter/setter pair
smartMeterReadPermission SmartMeterReadPermission?
The read permission frequency the occupier grants to meter readings from smart meters.
getter/setter pair
smartOnboardingProductType SmartOnboardingProductType?
A code to indicate which type of smart tariff the customer is meant to onboard onto.
getter/setter pair
soldAt DateTime?
A datetime of when the account sale was made.
getter/setter pair
source AccountSource
getter/setter pair
users List<User>
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited