Skip to content

Commit

Permalink
removing serialized name annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
jleon15 committed Jan 26, 2024
1 parent 21fc262 commit c2c3220
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package com.basistheory.android.model

import com.google.gson.annotations.SerializedName
import java.time.OffsetDateTime

class CreateSessionResponse(
@SerializedName("session_key") var sessionKey: String,
var sessionKey: String,

@SerializedName("nonce") var nonce: String,
var nonce: String,

@SerializedName("expires_at") var expiresAt: OffsetDateTime
var expiresAt: OffsetDateTime
)

internal fun com.basistheory.CreateSessionResponse.toAndroid(): CreateSessionResponse =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
package com.basistheory.android.model

import com.google.gson.annotations.SerializedName

class CreateTokenRequest(
@SerializedName("id") var id: String? = null,
var id: String? = null,

@SerializedName("type") var type: String,
var type: String,

@SerializedName("data") var data: Any,
var data: Any,

@SerializedName("mask") var mask: Any? = null,
var mask: Any? = null,

@SerializedName("fingerprint_expression") var fingerprintExpression: String? = null,
var fingerprintExpression: String? = null,

@SerializedName("deduplicate_token") var deduplicateToken: Boolean? = null,
var deduplicateToken: Boolean? = null,

@SerializedName("expires_at") var expiresAt: String? = null,
var expiresAt: String? = null,

@SerializedName("metadata") var metadata: Map<String, String>? = null,
var metadata: Map<String, String>? = null,

@SerializedName("containers") var containers: List<String>? = null,
var containers: List<String>? = null,

@SerializedName("search_indexes") var searchIndexes: List<String>? = null,
var searchIndexes: List<String>? = null,
)

internal fun CreateTokenRequest.toJava(): com.basistheory.CreateTokenRequest =
Expand Down
33 changes: 16 additions & 17 deletions lib/src/main/java/com/basistheory/android/model/Token.kt
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
package com.basistheory.android.model

import com.google.gson.annotations.SerializedName
import java.time.OffsetDateTime
import java.util.UUID

class Token(
@SerializedName("id") var id: String,
var id: String,

@SerializedName("tenant_id") var tenantId: UUID,
var tenantId: UUID,

@SerializedName("type") var type: String,
var type: String,

@SerializedName("data") var data: Any,
var data: Any,

@SerializedName("mask") var mask: Any? = null,
var mask: Any? = null,

@SerializedName("fingerprint") var fingerprint: String? = null,
var fingerprint: String? = null,

@SerializedName("fingerprint_expression") var fingerprintExpression: String? = null,
var fingerprintExpression: String? = null,

@SerializedName("enrichments") var enrichments: Any? = null,
var enrichments: Any? = null,

@SerializedName("expires_at") var expiresAt: OffsetDateTime? = null,
var expiresAt: OffsetDateTime? = null,

@SerializedName("created_by") var createdBy: UUID,
var createdBy: UUID,

@SerializedName("created_at") var createdAt: OffsetDateTime,
var createdAt: OffsetDateTime,

@SerializedName("modified_by") var modifiedBy: UUID? = null,
var modifiedBy: UUID? = null,

@SerializedName("modified_at") var modifiedAt: OffsetDateTime? = null,
var modifiedAt: OffsetDateTime? = null,

@SerializedName("metadata") var metadata: Map<String, String>? = null,
var metadata: Map<String, String>? = null,

@SerializedName("containers") var containers: List<String>,
var containers: List<String>,

@SerializedName("search_indexes") var searchIndexes: List<String>? = null,
var searchIndexes: List<String>? = null,
)

internal fun com.basistheory.Token.toAndroid(): Token =
Expand Down

0 comments on commit c2c3220

Please sign in to comment.