Skip to content

Commit c1d153c

Browse files
feat(deps-dev): bump @seamapi/types from 1.417.0 to 1.420.1 in the seam group (#214)
* feat(deps-dev): bump @seamapi/types in the seam group Bumps the seam group with 1 update: [@seamapi/types](https://github.com/seamapi/types). Updates `@seamapi/types` from 1.417.0 to 1.420.1 - [Release notes](https://github.com/seamapi/types/releases) - [Changelog](https://github.com/seamapi/types/blob/main/.releaserc.json) - [Commits](seamapi/types@v1.417.0...v1.420.1) --- updated-dependencies: - dependency-name: "@seamapi/types" dependency-version: 1.420.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: seam ... Signed-off-by: dependabot[bot] <support@github.com> * ci: Generate code --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Seam Bot <seambot@getseam.com>
1 parent 5a9ffff commit c1d153c

9 files changed

Lines changed: 389 additions & 132 deletions

File tree

output/csharp/src/Seam/Api/AccessGrants.cs

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,88 @@ await ListAsync(
658658
)
659659
);
660660
}
661+
662+
[DataContract(Name = "updateRequest_request")]
663+
public class UpdateRequest
664+
{
665+
[JsonConstructorAttribute]
666+
protected UpdateRequest() { }
667+
668+
public UpdateRequest(
669+
string accessGrantId = default,
670+
string? endsAt = default,
671+
string? startsAt = default
672+
)
673+
{
674+
AccessGrantId = accessGrantId;
675+
EndsAt = endsAt;
676+
StartsAt = startsAt;
677+
}
678+
679+
[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)]
680+
public string AccessGrantId { get; set; }
681+
682+
[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)]
683+
public string? EndsAt { get; set; }
684+
685+
[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)]
686+
public string? StartsAt { get; set; }
687+
688+
public override string ToString()
689+
{
690+
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);
691+
692+
StringWriter stringWriter = new StringWriter(
693+
new StringBuilder(256),
694+
System.Globalization.CultureInfo.InvariantCulture
695+
);
696+
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
697+
{
698+
jsonTextWriter.IndentChar = ' ';
699+
jsonTextWriter.Indentation = 2;
700+
jsonTextWriter.Formatting = Formatting.Indented;
701+
jsonSerializer.Serialize(jsonTextWriter, this, null);
702+
}
703+
704+
return stringWriter.ToString();
705+
}
706+
}
707+
708+
public void Update(UpdateRequest request)
709+
{
710+
var requestOptions = new RequestOptions();
711+
requestOptions.Data = request;
712+
_seam.Post<object>("/access_grants/update", requestOptions);
713+
}
714+
715+
public void Update(
716+
string accessGrantId = default,
717+
string? endsAt = default,
718+
string? startsAt = default
719+
)
720+
{
721+
Update(
722+
new UpdateRequest(accessGrantId: accessGrantId, endsAt: endsAt, startsAt: startsAt)
723+
);
724+
}
725+
726+
public async Task UpdateAsync(UpdateRequest request)
727+
{
728+
var requestOptions = new RequestOptions();
729+
requestOptions.Data = request;
730+
await _seam.PostAsync<object>("/access_grants/update", requestOptions);
731+
}
732+
733+
public async Task UpdateAsync(
734+
string accessGrantId = default,
735+
string? endsAt = default,
736+
string? startsAt = default
737+
)
738+
{
739+
await UpdateAsync(
740+
new UpdateRequest(accessGrantId: accessGrantId, endsAt: endsAt, startsAt: startsAt)
741+
);
742+
}
661743
}
662744
}
663745

0 commit comments

Comments
 (0)