-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
936 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import 'package:equatable/equatable.dart'; | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:square_connect/square_connect.dart'; | ||
|
||
part 'create_customer_group.g.dart'; | ||
|
||
@JsonSerializable() | ||
class CreateCustomerGroupRequest extends Equatable { | ||
const CreateCustomerGroupRequest({ | ||
this.group, | ||
this.idempotencyKey, | ||
}); | ||
|
||
/// Converts a [Map] to an [CreateCustomerGroupRequest] | ||
factory CreateCustomerGroupRequest.fromJson(Map<String, dynamic> json) => | ||
_$CreateCustomerGroupRequestFromJson(json); | ||
|
||
/// Converts a [CreateCustomerGroupRequest] to a [Map] | ||
Map<String, dynamic> toJson() => _$CreateCustomerGroupRequestToJson(this); | ||
|
||
/// The idempotency key for the request. | ||
final String? idempotencyKey; | ||
|
||
/// The customer group to create. | ||
final CustomerGroup? group; | ||
|
||
@override | ||
List<Object?> get props => [idempotencyKey, group]; | ||
} | ||
|
||
@JsonSerializable() | ||
class CreateCustomerGroupResponse extends SquareResponse { | ||
const CreateCustomerGroupResponse({this.group, super.errors}); | ||
|
||
/// Converts a [Map] to an [CreateCustomerGroupResponse] | ||
factory CreateCustomerGroupResponse.fromJson(Map<String, dynamic> json) => | ||
_$CreateCustomerGroupResponseFromJson(json); | ||
|
||
/// Converts a [CreateCustomerGroupResponse] to a [Map] | ||
Map<String, dynamic> toJson() => _$CreateCustomerGroupResponseToJson(this); | ||
|
||
/// The successfully created customer group. | ||
final CustomerGroup? group; | ||
|
||
@override | ||
List<Object?> get props => [group, errors]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:square_connect/square_connect.dart'; | ||
|
||
part 'delete_customer_group.g.dart'; | ||
|
||
@JsonSerializable() | ||
class DeleteCustomerGroupResponse extends SquareResponse { | ||
const DeleteCustomerGroupResponse({super.errors}); | ||
|
||
/// Converts a [Map] to an [DeleteCustomerGroupResponse] | ||
factory DeleteCustomerGroupResponse.fromJson(Map<String, dynamic> json) => | ||
_$DeleteCustomerGroupResponseFromJson(json); | ||
|
||
/// Converts a [DeleteCustomerGroupResponse] to a [Map] | ||
Map<String, dynamic> toJson() => _$DeleteCustomerGroupResponseToJson(this); | ||
|
||
@override | ||
List<Object?> get props => [errors]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:square_connect/square_connect.dart'; | ||
|
||
part 'list_customer_groups.g.dart'; | ||
|
||
@JsonSerializable() | ||
class ListCustomerGroupsResponse extends SquareResponse { | ||
const ListCustomerGroupsResponse({ | ||
this.groups, | ||
this.cursor, | ||
super.errors, | ||
}); | ||
|
||
/// Converts a [Map] to an [ListCustomerGroupsResponse] | ||
factory ListCustomerGroupsResponse.fromJson(Map<String, dynamic> json) => | ||
_$ListCustomerGroupsResponseFromJson(json); | ||
|
||
/// Converts a [ListCustomerGroupsResponse] to a [Map] | ||
Map<String, dynamic> toJson() => _$ListCustomerGroupsResponseToJson(this); | ||
|
||
/// A list of customer groups belonging to the current seller. | ||
final List<CustomerGroup>? groups; | ||
|
||
/// A pagination cursor to retrieve the next set of results for your | ||
/// original query to the endpoint. This value is present only if the | ||
/// request succeeded and additional results are available. | ||
final String? cursor; | ||
|
||
@override | ||
List<Object?> get props => [groups, cursor, errors]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:square_connect/square_connect.dart'; | ||
|
||
part 'list_customer_segments.g.dart'; | ||
|
||
@JsonSerializable() | ||
class ListCustomerSegmentsResponse extends SquareResponse { | ||
const ListCustomerSegmentsResponse({ | ||
this.segments, | ||
this.cursor, | ||
super.errors, | ||
}); | ||
|
||
/// Converts a [Map] to an [ListCustomerSegmentsResponse] | ||
factory ListCustomerSegmentsResponse.fromJson(Map<String, dynamic> json) => | ||
_$ListCustomerSegmentsResponseFromJson(json); | ||
|
||
/// Converts a [ListCustomerSegmentsResponse] to a [Map] | ||
Map<String, dynamic> toJson() => _$ListCustomerSegmentsResponseToJson(this); | ||
|
||
/// The list of customer segments belonging to the associated Square account. | ||
final List<CustomerSegment>? segments; | ||
|
||
/// A pagination cursor to be used in subsequent calls to | ||
/// ListCustomerSegments to retrieve the next set of query results. The cursor | ||
/// is only present if the request succeeded and additional results are | ||
/// available. | ||
final String? cursor; | ||
|
||
@override | ||
List<Object?> get props => [segments, cursor, errors]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:square_connect/square_connect.dart'; | ||
|
||
part 'retrieve_customer_group.g.dart'; | ||
|
||
@JsonSerializable() | ||
class RetrieveCustomerGroupResponse extends SquareResponse { | ||
const RetrieveCustomerGroupResponse({this.group, super.errors}); | ||
|
||
/// Converts a [Map] to an [RetrieveCustomerGroupResponse] | ||
factory RetrieveCustomerGroupResponse.fromJson(Map<String, dynamic> json) => | ||
_$RetrieveCustomerGroupResponseFromJson(json); | ||
|
||
/// Converts a [RetrieveCustomerGroupResponse] to a [Map] | ||
Map<String, dynamic> toJson() => _$RetrieveCustomerGroupResponseToJson(this); | ||
|
||
final CustomerGroup? group; | ||
|
||
@override | ||
List<Object?> get props => [group, errors]; | ||
} |
Oops, something went wrong.