toJson method

String toJson()

Example: Extended class of PaymayaBillingAddress.

final shippingAddress = PaymayaShippingAddress(
  phone:'09123456789',
  email:'paymaya@flutter.com',
  shippingType: Shippingtype.st, // Standard
  firstName: 'John'
  middleName: 'Birb',
  lastName: 'Doe',
  line1: '123-4567',
  line2: '456-789',
  city: 'Davao City',
  state: 'Davao del Sur',
  zipCode: 8000,
  countryCode: 'PH', /// Default value is set to 'PH'
);

Implementation

String toJson() => json.encode(toMap());