Skip to content

Commit

Permalink
Fix typo (#30)
Browse files Browse the repository at this point in the history
* fix: Rename emailAddres to emailAddress

* chore: bump versions

* docs: update changelogs

* docs: fix version

* refactor: format code
  • Loading branch information
mit-73 authored Oct 4, 2021
1 parent 9fc18d7 commit 576f843
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 34 deletions.
5 changes: 2 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';

import 'package:mad_pay/mad_pay.dart';

void main() {
Expand All @@ -23,7 +22,7 @@ class _MyAppState extends State<MyApp> {
final AppleParameters appleParameters = AppleParameters(
merchantIdentifier: 'example_id',
billingContact: Contact(
emailAddres: '[email protected]',
emailAddress: '[email protected]',
postalAddress: PostalAddress(
street: 's',
city: 'c',
Expand All @@ -47,7 +46,7 @@ class _MyAppState extends State<MyApp> {
),
),
shippingContact: Contact(
emailAddres: '[email protected]',
emailAddress: '[email protected]',
),
);

Expand Down
7 changes: 7 additions & 0 deletions packages/mad_pay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2.2.5

* Fix typo `emailAddress`
* Bump `mad_pay_android` version to `2.2.4`
* Bump `mad_pay_ios` version to `2.2.3`
* Bump `mad_pay_platform_interface` version to `2.2.2`

## 2.2.4

* Bump `mad_pay_android` version
Expand Down
8 changes: 4 additions & 4 deletions packages/mad_pay/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mad_pay
description: Mad Pay will help you make payments through Apple Pay and Google Pay
version: 2.2.4
version: 2.2.5
repository: https://github.com/MadBrains/Mad-Pay-Flutter
issue_tracker: https://github.com/MadBrains/Mad-Pay-Flutter/issues
homepage: https://madbrains.ru/
Expand All @@ -12,9 +12,9 @@ environment:
dependencies:
flutter:
sdk: flutter
mad_pay_platform_interface: ^2.2.1
mad_pay_android: ^2.2.3
mad_pay_ios: ^2.2.2
mad_pay_platform_interface: ^2.2.2
mad_pay_android: ^2.2.4
mad_pay_ios: ^2.2.3

# For development. Remove/comment before publishing to pub.
# dependency_overrides:
Expand Down
5 changes: 5 additions & 0 deletions packages/mad_pay_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.2.4

* Fix typo `emailAddress`
* Bump `mad_pay_platform_interface` version to `2.2.2`

## 2.2.3

* Bump `mad_pay_platform_interface` version
Expand Down
2 changes: 1 addition & 1 deletion packages/mad_pay_android/android/protos/apple.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum MerchantCapabilities {


message Contact {
string email_addres = 1;
string email_address = 1;
PersonNameComponents name = 2;
string phone_number = 3;
PostalAddress postal_address = 4;
Expand Down
4 changes: 2 additions & 2 deletions packages/mad_pay_android/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mad_pay_android
description: A plug-in to add support for payments on the Android side of Mad Pay
version: 2.2.3
version: 2.2.4
repository: https://github.com/MadBrains/Mad-Pay-Flutter
issue_tracker: https://github.com/MadBrains/Mad-Pay-Flutter/issues
homepage: https://madbrains.ru/
Expand All @@ -14,7 +14,7 @@ dependencies:
sdk: flutter
flutter_localizations:
sdk: flutter
mad_pay_platform_interface: ^2.2.1
mad_pay_platform_interface: ^2.2.2
flutter_svg: ^0.22.0

# For development. Remove/comment before publishing to pub.
Expand Down
5 changes: 5 additions & 0 deletions packages/mad_pay_ios/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.2.3

* Fix typo `emailAddress`
* Bump `mad_pay_platform_interface` version to `2.2.2`

## 2.2.2

* Bump `mad_pay_platform_interface` version
Expand Down
2 changes: 1 addition & 1 deletion packages/mad_pay_ios/ios/Classes/PaymentHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class PaymentNetworkHelper {
static func getContact(_ appleContact: Apple_Contact) -> PKContact? {
let contact = PKContact()

contact.emailAddress = appleContact.emailAddres
contact.emailAddress = appleContact.emailAddress
if appleContact.hasName {
contact.name = getPersonNameComponents(appleContact.name)
}
Expand Down
12 changes: 6 additions & 6 deletions packages/mad_pay_ios/ios/Classes/protos/apple.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ struct Apple_Contact {
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.

var emailAddres: String = String()
var emailAddress: String = String()

var name: Apple_PersonNameComponents {
get {return _name ?? Apple_PersonNameComponents()}
Expand Down Expand Up @@ -477,7 +477,7 @@ extension Apple_AppleParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
extension Apple_Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".Contact"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "email_addres"),
1: .standard(proto: "email_address"),
2: .same(proto: "name"),
3: .standard(proto: "phone_number"),
4: .standard(proto: "postal_address"),
Expand All @@ -489,7 +489,7 @@ extension Apple_Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self.emailAddres) }()
case 1: try { try decoder.decodeSingularStringField(value: &self.emailAddress) }()
case 2: try { try decoder.decodeSingularMessageField(value: &self._name) }()
case 3: try { try decoder.decodeSingularStringField(value: &self.phoneNumber) }()
case 4: try { try decoder.decodeSingularMessageField(value: &self._postalAddress) }()
Expand All @@ -499,8 +499,8 @@ extension Apple_Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
}

func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.emailAddres.isEmpty {
try visitor.visitSingularStringField(value: self.emailAddres, fieldNumber: 1)
if !self.emailAddress.isEmpty {
try visitor.visitSingularStringField(value: self.emailAddress, fieldNumber: 1)
}
if let v = self._name {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
Expand All @@ -515,7 +515,7 @@ extension Apple_Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
}

static func ==(lhs: Apple_Contact, rhs: Apple_Contact) -> Bool {
if lhs.emailAddres != rhs.emailAddres {return false}
if lhs.emailAddress != rhs.emailAddress {return false}
if lhs._name != rhs._name {return false}
if lhs.phoneNumber != rhs.phoneNumber {return false}
if lhs._postalAddress != rhs._postalAddress {return false}
Expand Down
4 changes: 2 additions & 2 deletions packages/mad_pay_ios/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mad_pay_ios
description: A plug-in to add support for payments on the iOS side of Mad Pay
version: 2.2.2
version: 2.2.3
repository: https://github.com/MadBrains/Mad-Pay-Flutter
issue_tracker: https://github.com/MadBrains/Mad-Pay-Flutter/issues
homepage: https://madbrains.ru/
Expand All @@ -12,7 +12,7 @@ environment:
dependencies:
flutter:
sdk: flutter
mad_pay_platform_interface: ^2.2.1
mad_pay_platform_interface: ^2.2.2

# For development. Remove/comment before publishing to pub.
# dependency_overrides:
Expand Down
4 changes: 4 additions & 0 deletions packages/mad_pay_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.2

* Fix typo `emailAddress`

## 2.2.1

* Add `PersonNameComponents` & `PostalAddress` models.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ class Contact {
/// Encapsulates contact information needed for billing and shipping.
/// {@endtemplate}
Contact({
this.emailAddres,
this.emailAddress,
this.name,
this.phoneNumber,
this.postalAddress,
});

/// The contact’s email address, or null if the contact’s email is not needed for the transaction.
final String? emailAddres;
final String? emailAddress;

/// The contact’s first and last name, or null if the contact’s name is not needed for the transaction.
final PersonNameComponents? name;
Expand All @@ -143,7 +143,7 @@ class Contact {
extension ContactX on Contact {
/// Mapped this model to proto model
proto.Contact? get toProto => proto.Contact(
emailAddres: emailAddres,
emailAddress: emailAddress,
name: name?.toProto,
phoneNumber: phoneNumber,
postalAddress: postalAddress?.toProto,
Expand Down
16 changes: 8 additions & 8 deletions packages/mad_pay_platform_interface/lib/src/protos/apple.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class Contact extends $pb.GeneratedMessage {
1,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'emailAddres')
: 'emailAddress')
..aOM<PersonNameComponents>(
2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name',
subBuilder: PersonNameComponents.create)
Expand All @@ -239,14 +239,14 @@ class Contact extends $pb.GeneratedMessage {

Contact._() : super();
factory Contact({
$core.String? emailAddres,
$core.String? emailAddress,
PersonNameComponents? name,
$core.String? phoneNumber,
PostalAddress? postalAddress,
}) {
final _result = create();
if (emailAddres != null) {
_result.emailAddres = emailAddres;
if (emailAddress != null) {
_result.emailAddress = emailAddress;
}
if (name != null) {
_result.name = name;
Expand Down Expand Up @@ -286,16 +286,16 @@ class Contact extends $pb.GeneratedMessage {
static Contact? _defaultInstance;

@$pb.TagNumber(1)
$core.String get emailAddres => $_getSZ(0);
$core.String get emailAddress => $_getSZ(0);
@$pb.TagNumber(1)
set emailAddres($core.String v) {
set emailAddress($core.String v) {
$_setString(0, v);
}

@$pb.TagNumber(1)
$core.bool hasEmailAddres() => $_has(0);
$core.bool hasEmailAddress() => $_has(0);
@$pb.TagNumber(1)
void clearEmailAddres() => clearField(1);
void clearEmailAddress() => clearField(1);

@$pb.TagNumber(2)
PersonNameComponents get name => $_getN(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ final $typed_data.Uint8List appleParametersDescriptor = $convert.base64Decode(
const Contact$json = const {
'1': 'Contact',
'2': const [
const {'1': 'email_addres', '3': 1, '4': 1, '5': 9, '10': 'emailAddres'},
const {'1': 'email_address', '3': 1, '4': 1, '5': 9, '10': 'emailAddress'},
const {
'1': 'name',
'3': 2,
Expand All @@ -149,7 +149,7 @@ const Contact$json = const {

/// Descriptor for `Contact`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List contactDescriptor = $convert.base64Decode(
'CgdDb250YWN0EiEKDGVtYWlsX2FkZHJlcxgBIAEoCVILZW1haWxBZGRyZXMSLwoEbmFtZRgCIAEoCzIbLmFwcGxlLlBlcnNvbk5hbWVDb21wb25lbnRzUgRuYW1lEiEKDHBob25lX251bWJlchgDIAEoCVILcGhvbmVOdW1iZXISOwoOcG9zdGFsX2FkZHJlc3MYBCABKAsyFC5hcHBsZS5Qb3N0YWxBZGRyZXNzUg1wb3N0YWxBZGRyZXNz');
'CgdDb250YWN0EiMKDWVtYWlsX2FkZHJlc3MYASABKAlSDGVtYWlsQWRkcmVzcxIvCgRuYW1lGAIgASgLMhsuYXBwbGUuUGVyc29uTmFtZUNvbXBvbmVudHNSBG5hbWUSIQoMcGhvbmVfbnVtYmVyGAMgASgJUgtwaG9uZU51bWJlchI7Cg5wb3N0YWxfYWRkcmVzcxgEIAEoCzIULmFwcGxlLlBvc3RhbEFkZHJlc3NSDXBvc3RhbEFkZHJlc3M=');
@$core.Deprecated('Use personNameComponentsDescriptor instead')
const PersonNameComponents$json = const {
'1': 'PersonNameComponents',
Expand Down
4 changes: 2 additions & 2 deletions packages/mad_pay_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mad_pay_platform_interface
description: A common platform interface for Mad Pay. Сontains cross-platform logic.
version: 2.2.1
version: 2.2.2
repository: https://github.com/MadBrains/Mad-Pay-Flutter
issue_tracker: https://github.com/MadBrains/Mad-Pay-Flutter/issues
homepage: https://madbrains.ru/
Expand All @@ -13,7 +13,7 @@ dependencies:
flutter:
sdk: flutter
protobuf: ^2.0.0
plugin_platform_interface: ^2.0.0
plugin_platform_interface: ^2.0.2

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 576f843

Please sign in to comment.