diff --git a/api/openapi.yaml b/api/openapi.yaml index eb73fc6c..1a3a62f5 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: description: An OpenAPI specifications for unit-sdk clients title: Unit OpenAPI specifications - version: 0.2.0 + version: 0.0.2 servers: - url: https://api.s.unit.sh security: @@ -78,7 +78,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request' + $ref: '#/components/schemas/CancelApplicationRequest' description: Cancel Application Request required: true responses: @@ -188,7 +188,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_1' + $ref: '#/components/schemas/createApplicationForm' description: Create Application Form Request required: true responses: @@ -435,7 +435,7 @@ paths: content: application/vnd.api+json; charset=utf-8: schema: - $ref: '#/components/schemas/execute_200_response' + $ref: '#/components/schemas/UnitListDocumentsResponse' description: Successful Response summary: Get List of Documents tags: @@ -483,7 +483,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/execute_request_2' + $ref: '#/components/schemas/VerifyDocument' description: Verify Document required: true responses: @@ -752,7 +752,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_3' + $ref: '#/components/schemas/FreezeAccountRequest' description: Freeze Account Request required: true responses: @@ -783,7 +783,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_4' + $ref: '#/components/schemas/CloseAccountRequest' description: Close Account Request required: true responses: @@ -1003,8 +1003,8 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_5' - description: Update Payment Request + $ref: '#/components/schemas/ArchiveCustomerRequest' + description: Archive Customer Request required: true responses: "200": @@ -1059,7 +1059,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_6' + $ref: '#/components/schemas/createPayment' description: Create Payment Request required: true responses: @@ -1285,7 +1285,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_7' + $ref: '#/components/schemas/createCounterparty' description: Create Counterparty Request required: true responses: @@ -1431,7 +1431,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_8' + $ref: '#/components/schemas/createRecurringPayment' description: Create Recurring Payment Request required: true responses: @@ -1553,7 +1553,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_9' + $ref: '#/components/schemas/createCard' description: Create Card Request required: true responses: @@ -1801,7 +1801,7 @@ paths: content: application/vnd.api+json; charset=utf-8: schema: - $ref: '#/components/schemas/execute_200_response_1' + $ref: '#/components/schemas/UnitListAuthorizationsResponse' description: Successful Response summary: Get List authorizations tags: @@ -1853,7 +1853,7 @@ paths: content: application/vnd.api+json; charset=utf-8: schema: - $ref: '#/components/schemas/execute_200_response_2' + $ref: '#/components/schemas/UnitListAuthorizationRequestsResponse' description: Successful Response summary: Get List Authorization Requests tags: @@ -1896,8 +1896,8 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_10' - description: Approve Authorization Request Request + $ref: '#/components/schemas/ApproveAuthorizationRequest' + description: Approve Authorization Request required: true responses: "200": @@ -1926,8 +1926,8 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_11' - description: Decline Authorization Request Request + $ref: '#/components/schemas/DeclineAuthorizationRequest' + description: Decline Authorization Request required: true responses: "200": @@ -2080,7 +2080,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_12' + $ref: '#/components/schemas/createReward' description: Create Reward Request required: true responses: @@ -2216,7 +2216,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_13' + $ref: '#/components/schemas/createFee' description: Create Fee Request required: true responses: @@ -2259,9 +2259,7 @@ paths: content: application/vnd.api+json; charset=utf-8: schema: - items: - $ref: '#/components/schemas/check_deposit' - type: array + $ref: '#/components/schemas/UnitListCheckDepositsResponse' description: Successful Response summary: Get List Check Deposits tags: @@ -2274,7 +2272,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_14' + $ref: '#/components/schemas/createCheckDeposit' description: Create Check Deposit Request required: true responses: @@ -2442,7 +2440,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_15' + $ref: '#/components/schemas/createApiToken' description: Create Org API Token Request required: true responses: @@ -2500,7 +2498,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_16' + $ref: '#/components/schemas/createCustomerToken' description: Create Customer Token Request required: true responses: @@ -2530,7 +2528,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_17' + $ref: '#/components/schemas/createCustomerTokenVerification' description: Create Customer Token Verification Request required: true responses: @@ -2709,7 +2707,7 @@ paths: application/vnd.api+json; charset=utf-8: schema: items: - type: object + $ref: '#/components/schemas/atm_location' title: UnitAtmLocationsListResponse type: array description: Successful Response @@ -2899,7 +2897,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_18' + $ref: '#/components/schemas/createRepayment' description: Create a Repayment Request required: true responses: @@ -2967,7 +2965,7 @@ paths: content: application/vnd.api+json; charset=utf-8: schema: - $ref: '#/components/schemas/execute_200_response_3' + $ref: '#/components/schemas/UnitListCheckPaymentsResponse' description: Successful Response summary: Get List Check Payments tags: @@ -2980,7 +2978,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_19' + $ref: '#/components/schemas/createCheckPayment' description: Create Check Payment Request required: true responses: @@ -3032,7 +3030,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_20' + $ref: '#/components/schemas/ApproveCheckPaymentRequest' description: Approve Check Payment Request required: true responses: @@ -3084,7 +3082,7 @@ paths: content: application/vnd.api+json: schema: - $ref: '#/components/schemas/execute_request_21' + $ref: '#/components/schemas/ReturnCheckPaymentRequest' description: Return Check Payment Request required: true responses: @@ -3185,7 +3183,7 @@ paths: schema: $ref: '#/components/schemas/StopPaymentResponse' description: OK - summary: Create a new stop payment + summary: Create Stop Payment x-content-type: application/json x-accepts: application/json /stop-payments/{stop_payment_id}: @@ -3282,64 +3280,44 @@ components: - type title: Patch Business Application type: object - officer: + patchBusinessApplicationOfficer: additionalProperties: false properties: - fullName: - $ref: '#/components/schemas/fullName' - ssn: - pattern: "^\\d{9}$" - type: string - passport: - type: string - nationality: - pattern: ^(A(D|E|F|G|I|L|M|N|O|R|S|T|Q|U|W|X|Z)|B(A|B|D|E|F|G|H|I|J|L|M|N|O|Q|R|S|T|V|W|Y|Z)|C(A|C|D|F|G|H|I|K|L|M|N|O|R|U|V|W|X|Y|Z)|D(E|J|K|M|O|Z)|E(C|E|G|H|R|S|T)|F(I|J|K|M|O|R)|G(A|B|D|E|F|G|H|I|L|M|N|P|Q|R|S|T|U|W|Y)|H(K|M|N|R|T|U)|I(D|E|Q|L|M|N|O|R|S|T)|J(E|M|O|P)|K(E|G|H|I|M|N|P|R|W|Y|Z)|L(A|B|C|I|K|R|S|T|U|V|Y)|M(A|C|D|E|F|G|H|K|L|M|N|O|Q|P|R|S|T|U|V|W|X|Y|Z)|N(A|C|E|F|G|I|L|O|P|R|U|Z)|OM|P(A|E|F|G|H|K|L|M|N|R|S|T|W|Y)|QA|R(E|O|S|U|W)|S(A|B|C|D|E|G|H|I|J|K|L|M|N|O|R|T|V|X|Y|Z)|T(C|D|F|G|H|J|K|L|M|N|O|R|T|V|W|Z)|U(A|G|M|S|Y|Z)|V(A|C|E|G|I|N|U)|W(F|S)|XK|Y(E|T)|Z(A|M|W))$ - type: string - matriculaConsular: - type: string - address: - $ref: '#/components/schemas/address' - dateOfBirth: - format: date - type: string - phone: - $ref: '#/components/schemas/phone' - email: - format: email + type: + default: businessApplication type: string - occupation: - $ref: '#/components/schemas/occupation' - annualIncome: - $ref: '#/components/schemas/annualIncome' - sourceOfIncome: - $ref: '#/components/schemas/sourceOfIncome' - title: Officer + attributes: + $ref: '#/components/schemas/patchBusinessApplicationOfficer_attributes' + required: + - attributes + - type + title: Patch Business Application type: object - beneficialOwner: + patchBusinessApplicationBeneficialOwner: additionalProperties: false properties: - ssn: - pattern: "^\\d{9}$" - type: string - passport: - type: string - nationality: - pattern: ^(A(D|E|F|G|I|L|M|N|O|R|S|T|Q|U|W|X|Z)|B(A|B|D|E|F|G|H|I|J|L|M|N|O|Q|R|S|T|V|W|Y|Z)|C(A|C|D|F|G|H|I|K|L|M|N|O|R|U|V|W|X|Y|Z)|D(E|J|K|M|O|Z)|E(C|E|G|H|R|S|T)|F(I|J|K|M|O|R)|G(A|B|D|E|F|G|H|I|L|M|N|P|Q|R|S|T|U|W|Y)|H(K|M|N|R|T|U)|I(D|E|Q|L|M|N|O|R|S|T)|J(E|M|O|P)|K(E|G|H|I|M|N|P|R|W|Y|Z)|L(A|B|C|I|K|R|S|T|U|V|Y)|M(A|C|D|E|F|G|H|K|L|M|N|O|Q|P|R|S|T|U|V|W|X|Y|Z)|N(A|C|E|F|G|I|L|O|P|R|U|Z)|OM|P(A|E|F|G|H|K|L|M|N|R|S|T|W|Y)|QA|R(E|O|S|U|W)|S(A|B|C|D|E|G|H|I|J|K|L|M|N|O|R|T|V|X|Y|Z)|T(C|D|F|G|H|J|K|L|M|N|O|R|T|V|W|Z)|U(A|G|M|S|Y|Z)|V(A|C|E|G|I|N|U)|W(F|S)|XK|Y(E|T)|Z(A|M|W))$ - type: string - matriculaConsular: + type: + default: beneficialOwner type: string - address: - $ref: '#/components/schemas/address' - dateOfBirth: - format: date + attributes: + $ref: '#/components/schemas/patchBusinessApplicationBeneficialOwner_attributes' + required: + - attributes + - type + title: Patch Business Application + type: object + patchSoleProprietorApplication: + additionalProperties: false + properties: + type: + default: individualApplication type: string - occupation: - $ref: '#/components/schemas/occupation' - annualIncome: - $ref: '#/components/schemas/annualIncome' - sourceOfIncome: - $ref: '#/components/schemas/sourceOfIncome' - title: Beneficial Owner + attributes: + $ref: '#/components/schemas/patchSoleProprietorApplication_attributes' + required: + - attributes + - type + title: Patch Individual Application type: object patchIndividualApplication: additionalProperties: false @@ -3483,7 +3461,7 @@ components: type: object title: BusinessApplication type: object - officer_1: + officer: properties: status: type: string @@ -3549,7 +3527,7 @@ components: $ref: '#/components/schemas/sourceOfIncome' title: Officer type: object - beneficialOwner_1: + beneficialOwner: properties: status: type: string @@ -3851,6 +3829,12 @@ components: type: integer evaluationParams: $ref: '#/components/schemas/evaluationParams' + occupation: + $ref: '#/components/schemas/occupation' + annualIncome: + $ref: '#/components/schemas/annualIncome' + sourceOfIncome: + $ref: '#/components/schemas/sourceOfIncome' required: - address - dateOfBirth @@ -3873,7 +3857,6 @@ components: title: Create Trust Application type: object application_form: - additionalProperties: false properties: type: default: applicationForm @@ -3885,37 +3868,13 @@ components: $ref: '#/components/schemas/application_form_attributes' relationships: $ref: '#/components/schemas/applicationFormRelationships' - officerIsBeneficialOwner: - default: false - type: boolean required: - attributes - id - type title: Application Form type: object - applicationFormRelationships: - additionalProperties: false - properties: - application: - $ref: '#/components/schemas/applicationFormRelationships_application' - title: applicationFormRelationships - type: object - createApplicationForm: - additionalProperties: false - properties: - type: - default: applicationForm - type: string - attributes: - $ref: '#/components/schemas/createApplicationForm_attributes' - relationships: - $ref: '#/components/schemas/createApplicationFormRelationships' - required: - - type - title: Create Application Form - type: object - prefilled: + ApplicationFormPrefill: additionalProperties: false properties: applicationType: @@ -3978,7 +3937,7 @@ components: $ref: '#/components/schemas/industry' title: Application Form Prefilled type: object - settingsOverride: + ApplicationFormSettingsOverride: additionalProperties: false properties: redirectUrl: @@ -4017,9 +3976,18 @@ components: items: $ref: '#/components/schemas/applicationFormAdditionalDisclosures_inner' type: array - validatePhoneNumber: - default: true - type: boolean + type: object + applicationFormRelationships: + additionalProperties: false + properties: + application: + $ref: '#/components/schemas/applicationFormRelationships_application' + title: applicationFormRelationships + type: object + createApplicationForm: + properties: + data: + $ref: '#/components/schemas/createApplicationForm_data' type: object requireIdVerification: additionalProperties: false @@ -4157,7 +4125,6 @@ components: $ref: '#/components/schemas/createAccount_data' required: - data - title: Create Account type: object CreateCreditAccount: properties: @@ -4260,6 +4227,7 @@ components: type: string attributes: $ref: '#/components/schemas/closeAccountRequest_attributes' + title: CloseAccountRequest type: object account_end_of_day: additionalProperties: false @@ -4470,15 +4438,9 @@ components: $ref: '#/components/schemas/IncludedResource_inner' type: array createPayment: - oneOf: - - $ref: '#/components/schemas/CreateAchPayment' - - $ref: '#/components/schemas/CreateAchPaymentCounterparty' - - $ref: '#/components/schemas/CreateAchPaymentPlaid' - - $ref: '#/components/schemas/CreateBookPayment' - - $ref: '#/components/schemas/CreateWirePayment' - - $ref: '#/components/schemas/CreateBillPayment' - - $ref: '#/components/schemas/CreatePushToCardPayment' - title: Create Payment + properties: + data: + $ref: '#/components/schemas/createPayment_data' type: object CreateAchPayment: additionalProperties: false @@ -4493,7 +4455,7 @@ components: required: - attributes - relationships - title: Create ACH Payment + title: Create ACH Payment to inline Counterparty type: object accountRelationship: additionalProperties: false @@ -4516,7 +4478,7 @@ components: required: - attributes - relationships - title: Create ACH Payment + title: Create ACH Payment to linked Counterparty type: object counterpartyRelationship: additionalProperties: false @@ -4539,7 +4501,7 @@ components: required: - attributes - relationships - title: Create ACH Payment + title: Create ACH Payment with Plaid token type: object CreateBookPayment: additionalProperties: false @@ -4659,7 +4621,6 @@ components: title: Received Payment Resource type: object receivedPaymentRelationships: - additionalProperties: true properties: account: $ref: '#/components/schemas/relationships_account' @@ -4727,10 +4688,9 @@ components: title: counterpartyRelationships type: object createCounterparty: - oneOf: - - $ref: '#/components/schemas/CreateAchCounterparty' - - $ref: '#/components/schemas/CreatePlaidCounterparty' - title: Create Counterparty + properties: + data: + $ref: '#/components/schemas/createCounterparty_data' type: object CreateAchCounterparty: additionalProperties: false @@ -4940,10 +4900,99 @@ components: $ref: '#/components/schemas/recurringAchPaymentRelationships_org' type: object createRecurringPayment: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/createRecurringPayment_data' + required: + - data + type: object + createRecurringCreditAchPayment: + additionalProperties: false + properties: + type: + default: recurringCreditAchPayment + type: string + attributes: + $ref: '#/components/schemas/createRecurringCreditAchPayment_attributes' + relationships: + $ref: '#/components/schemas/CreateAchPaymentCounterparty_relationships' + required: + - attributes + - relationships + - type + title: Create Recurring Credit ACH Payment + type: object + schedule_1: + oneOf: + - $ref: '#/components/schemas/monthlySchedule' + title: schedule + monthlySchedule: + additionalProperties: false + properties: + startTime: + format: date + type: string + endTime: + format: date + type: string + dayOfMonth: + maximum: 28 + minimum: -5 + type: integer + dayOfWeek: + enum: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + type: string + interval: + enum: + - Monthly + - Weekly + type: string + totalNumberOfPayments: + minimum: 1 + type: integer + required: + - interval + title: Create Monthly Schedule + type: object + createRecurringDebitAchPayment: + additionalProperties: false + properties: + type: + default: recurringDebitAchPayment + type: string + attributes: + $ref: '#/components/schemas/createRecurringDebitAchPayment_attributes' + relationships: + $ref: '#/components/schemas/CreateAchPaymentCounterparty_relationships' + required: + - attributes + - relationships + - type + title: Create Recurring Debit ACH Payment + type: object + createRecurringCreditBookPayment: + additionalProperties: false properties: type: + default: recurringCreditBookPayment type: string - title: Create Recurring Payment + attributes: + $ref: '#/components/schemas/createRecurringCreditBookPayment_attributes' + relationships: + $ref: '#/components/schemas/CreateBookPayment_relationships' + required: + - attributes + - relationships + - type + title: Create Recurring Credit Book Payment type: object card: discriminator: @@ -5088,14 +5137,9 @@ components: title: Business Virtual Credit Card type: object createCard: - oneOf: - - $ref: '#/components/schemas/CreateIndividualDebitCard' - - $ref: '#/components/schemas/CreateBusinessDebitCard' - - $ref: '#/components/schemas/CreateBusinessCreditCard' - - $ref: '#/components/schemas/CreateIndividualVirtualDebitCard' - - $ref: '#/components/schemas/CreateBusinessVirtualDebitCard' - - $ref: '#/components/schemas/CreateBusinessVirtualCreditCard' - title: Create Card + properties: + data: + $ref: '#/components/schemas/createCard_data' type: object CreateIndividualDebitCard: additionalProperties: false @@ -5568,20 +5612,9 @@ components: - receivingAccount type: object createReward: - additionalProperties: false properties: - type: - default: reward - type: string - attributes: - $ref: '#/components/schemas/createReward_attributes' - relationships: - $ref: '#/components/schemas/createRewardRelationships' - required: - - attributes - - relationships - - type - title: Reward + data: + $ref: '#/components/schemas/createReward_data' type: object createRewardRelationships: additionalProperties: false @@ -5635,29 +5668,6 @@ components: title: Institution Resource type: object createFee: - additionalProperties: false - properties: - type: - enum: - - fee - type: string - attributes: - $ref: '#/components/schemas/createFee_attributes' - relationships: - $ref: '#/components/schemas/createFeeRelationships' - required: - - attributes - - relationships - - type - title: Fee - type: object - createFeeRelationships: - additionalProperties: false - properties: - account: - $ref: '#/components/schemas/Relationship' - required: - - account type: object fee: properties: @@ -5745,21 +5755,9 @@ components: title: checkDepositRelationships type: object createCheckDeposit: - additionalProperties: false properties: - type: - enum: - - checkDeposit - type: string - attributes: - $ref: '#/components/schemas/createCheckDeposit_attributes' - relationships: - $ref: '#/components/schemas/createCheckDepositRelationships' - required: - - attributes - - relationships - - type - title: Check Deposit + data: + $ref: '#/components/schemas/createCheckDeposit_data' type: object createCheckDepositRelationships: additionalProperties: false @@ -5792,7 +5790,6 @@ components: title: Patch Check Deposit type: object api_token: - additionalProperties: true properties: type: default: apiToken @@ -5802,32 +5799,18 @@ components: type: string attributes: $ref: '#/components/schemas/api_token_attributes' - required: - - attributes - - id - - type title: apiToken type: object createApiToken: - additionalProperties: false properties: - type: - default: apiToken - type: string - attributes: - $ref: '#/components/schemas/createApiToken_attributes' - required: - - attributes - - type + data: + $ref: '#/components/schemas/createApiToken_data' title: Create API Token type: object createCustomerToken: properties: - type: - default: customerToken - type: string - attributes: - $ref: '#/components/schemas/createCustomerToken_attributes' + data: + $ref: '#/components/schemas/createCustomerToken_data' type: object customer_token: additionalProperties: false @@ -5843,16 +5826,9 @@ components: title: CustomerToken type: object createCustomerTokenVerification: - additionalProperties: false properties: - type: - default: customerTokenVerification - type: string - attributes: - $ref: '#/components/schemas/createCustomerTokenVerification_attributes' - required: - - attributes - - type + data: + $ref: '#/components/schemas/createCustomerTokenVerification_data' type: object customer_token_verification: additionalProperties: false @@ -5889,6 +5865,19 @@ components: data: $ref: '#/components/schemas/updateUnitRequest_data' type: object + atm_location: + additionalProperties: false + properties: + type: + default: atmLocation + type: string + attributes: + $ref: '#/components/schemas/atm_location_attributes' + required: + - attributes + - type + title: AtmLocation + type: object transaction: discriminator: mapping: @@ -6673,7 +6662,6 @@ components: properties: data: $ref: '#/components/schemas/createRepayment_data' - title: Create Repayment type: object CreateAchRepayment: additionalProperties: false @@ -6761,7 +6749,6 @@ components: $ref: '#/components/schemas/CheckPayment' required: - data - title: Create Check Payment type: object StopPaymentListResponse: example: @@ -6876,7 +6863,6 @@ components: $ref: '#/components/schemas/stopPayment' required: - data - title: Create Stop Payment type: object stopPayment: additionalProperties: false @@ -6966,70 +6952,6 @@ components: - Utilities - WholesaleTrade type: string - fullName: - additionalProperties: false - properties: - first: - maxLength: 255 - minLength: 1 - type: string - last: - maxLength: 255 - minLength: 1 - type: string - required: - - first - - last - title: Full Name - type: object - ssn: - pattern: "^\\d{9}$" - type: string - address: - additionalProperties: false - properties: - street: - maxLength: 255 - minLength: 1 - pattern: ^.*$ - type: string - street2: - nullable: true - pattern: ^.*$ - type: string - city: - maxLength: 255 - minLength: 1 - pattern: ^.*$ - type: string - state: - type: string - postalCode: - pattern: "^[0-9]{5}(?:-[0-9]{4})?$" - type: string - country: - default: US - type: string - required: - - city - - country - - postalCode - - state - - street - title: Address - type: object - phone: - additionalProperties: false - properties: - countryCode: - type: string - number: - type: string - required: - - countryCode - - number - title: Phone - type: object occupation: enum: - ArchitectOrEngineer @@ -7101,9 +7023,37 @@ components: - Pending - Canceled type: string + fullName: + additionalProperties: false + properties: + first: + maxLength: 255 + minLength: 1 + type: string + last: + maxLength: 255 + minLength: 1 + type: string + required: + - first + - last + title: Full Name + type: object email: format: email type: string + phone: + additionalProperties: false + properties: + countryCode: + type: string + number: + type: string + required: + - countryCode + - number + title: Phone + type: object tags: additionalProperties: false maxProperties: 15 @@ -7154,6 +7104,39 @@ components: state: pattern: "^((A[LKSZR])|(C[AOT])|(D[EC])|(F[ML])|(G[AU])|(HI)|(I[DLNA])|(K[SY])|(LA)|(M[EHDAINSOT])|(N[EVHJMYCD])|(MP)|(O[HKR])|(P[WAR])|(RI)|(S[CD])|(T[NX])|(UT)|(V[TIA])|(W[AVIY]))$" type: string + address: + additionalProperties: false + properties: + street: + maxLength: 255 + minLength: 1 + pattern: ^.*$ + type: string + street2: + nullable: true + pattern: ^.*$ + type: string + city: + maxLength: 255 + minLength: 1 + pattern: ^.*$ + type: string + state: + type: string + postalCode: + pattern: "^[0-9]{5}(?:-[0-9]{4})?$" + type: string + country: + default: US + type: string + required: + - city + - country + - postalCode + - state + - street + title: Address + type: object contact: additionalProperties: false properties: @@ -7310,9 +7293,6 @@ components: items: $ref: '#/components/schemas/applicationFormAdditionalDisclosures_inner' type: array - applicationFormValidatePhoneNumber: - default: true - type: boolean customerLinkage: additionalProperties: false properties: @@ -7570,24 +7550,25 @@ components: - type title: Stop Payment type: object - execute_request_data_attributes: + CancelApplicationRequest_data_attributes: properties: reason: type: string type: object - execute_request_data: + CancelApplicationRequest_data: properties: type: enum: - cancelApplication type: string attributes: - $ref: '#/components/schemas/execute_request_data_attributes' + $ref: '#/components/schemas/CancelApplicationRequest_data_attributes' type: object - execute_request: + CancelApplicationRequest: properties: data: - $ref: '#/components/schemas/execute_request_data' + $ref: '#/components/schemas/CancelApplicationRequest_data' + title: CancelApplicationRequest type: object UnitCancelApplicationResponse: properties: @@ -7666,6 +7647,8 @@ components: email: type: string tags: + additionalProperties: + type: string type: object type: object UnitApplicationFormsListResponse: @@ -7676,28 +7659,27 @@ components: type: array title: UnitApplicationFormsListResponse type: object - execute_request_1: - properties: - data: - $ref: '#/components/schemas/createApplicationForm' - type: object UnitApplicationFormResponse: properties: data: $ref: '#/components/schemas/application_form' title: UnitApplicationFormResponse type: object - execute_200_response: + UnitListDocumentsResponse: properties: data: items: $ref: '#/components/schemas/document' type: array + title: UnitListDocumentsResponse type: object - execute_request_2: + VerifyDocument: + example: + jobId: jobId properties: jobId: type: string + title: VerifyDocument type: object UnitApplicationFormResponseWithIncluded: properties: @@ -7731,6 +7713,8 @@ components: toBalance: type: number tags: + additionalProperties: + type: string type: object type: object UnitAccountsListResponse: @@ -7753,15 +7737,17 @@ components: $ref: '#/components/schemas/limits' title: UnitGetAccountLimitsResponse type: object - execute_request_3: + FreezeAccountRequest: properties: data: $ref: '#/components/schemas/freezeAccountRequest' + title: FreezeAccountRequest type: object - execute_request_4: + CloseAccountRequest: properties: data: $ref: '#/components/schemas/closeAccountRequest' + title: CloseAccountRequest type: object UnitGetAccountEndOfDayListResponse: properties: @@ -7783,6 +7769,8 @@ components: email: type: string tags: + additionalProperties: + type: string type: object type: object UnitCustomersListResponse: @@ -7795,7 +7783,7 @@ components: $ref: '#/components/schemas/paginationMeta' title: UnitCustomersListResponse type: object - execute_request_5_attributes: + ArchiveCustomerRequest_attributes: properties: reason: enum: @@ -7809,14 +7797,15 @@ components: - FraudLinkedToFraudulentCustomer type: string type: object - execute_request_5: + ArchiveCustomerRequest: properties: type: enum: - archiveCustomer type: string attributes: - $ref: '#/components/schemas/execute_request_5_attributes' + $ref: '#/components/schemas/ArchiveCustomerRequest_attributes' + title: ArchiveCustomerRequest type: object execute_filter_parameter_4: properties: @@ -7871,6 +7860,8 @@ components: type: string type: array tags: + additionalProperties: + type: string type: object type: object UnitPaymentsListResponse: @@ -7887,11 +7878,6 @@ components: $ref: '#/components/schemas/paginationMeta' title: UnitPaymentsListResponse type: object - execute_request_6: - properties: - data: - $ref: '#/components/schemas/createPayment' - type: object UnitPaymentResponseWithIncluded: properties: data: @@ -7943,6 +7929,8 @@ components: type: string type: array tags: + additionalProperties: + type: string type: object type: object UnitCounterpartiesListResponse: @@ -7951,11 +7939,6 @@ components: $ref: '#/components/schemas/counterparty_1' title: UnitCounterpartiesListResponse type: object - execute_request_7: - properties: - data: - $ref: '#/components/schemas/createCounterparty' - type: object UnitCounterpartyResponse: properties: data: @@ -8005,11 +7988,6 @@ components: $ref: '#/components/schemas/paginationMeta' title: UnitRecurringPaymentListResponse type: object - execute_request_8: - properties: - data: - $ref: '#/components/schemas/createRecurringPayment' - type: object execute_filter_parameter_7: properties: status: @@ -8029,6 +8007,8 @@ components: customerId: type: string tags: + additionalProperties: + type: string type: object type: object UnitCardResponseCardsList: @@ -8043,11 +8023,6 @@ components: type: array title: UnitCardResponseCardsList type: object - execute_request_9: - properties: - data: - $ref: '#/components/schemas/createCard' - type: object UnitCardResponse: properties: data: @@ -8110,12 +8085,13 @@ components: type: string type: array type: object - execute_200_response_1: + UnitListAuthorizationsResponse: properties: data: items: $ref: '#/components/schemas/authorization' type: array + title: UnitListAuthorizationsResponse type: object UnitAuthorizationResponse: properties: @@ -8138,12 +8114,13 @@ components: toAmount: type: integer type: object - execute_200_response_2: + UnitListAuthorizationRequestsResponse: properties: data: items: $ref: '#/components/schemas/authorization_request' type: array + title: UnitListAuthorizationRequestsResponse type: object UnitAuthorizationRequestsResponse: properties: @@ -8151,10 +8128,11 @@ components: $ref: '#/components/schemas/authorization_request' title: UnitAuthorizationRequestsResponse type: object - execute_request_10: + ApproveAuthorizationRequest: properties: data: $ref: '#/components/schemas/approveAuthorizationRequest' + title: ApproveAuthorizationRequest type: object UnitAuthorizationRequestResponse: properties: @@ -8162,10 +8140,11 @@ components: $ref: '#/components/schemas/authorization_request' title: UnitAuthorizationRequestResponse type: object - execute_request_11: + DeclineAuthorizationRequest: properties: data: $ref: '#/components/schemas/declineAuthorizationRequest' + title: DeclineAuthorizationRequest type: object execute_filter_parameter_10: properties: @@ -8203,6 +8182,8 @@ components: status: type: string tags: + additionalProperties: + type: string type: object type: object UnitRewardsListResponse: @@ -8213,11 +8194,6 @@ components: type: array title: UnitRewardsListResponse type: object - execute_request_12: - properties: - data: - $ref: '#/components/schemas/createReward' - type: object UnitRewardResponse: properties: data: @@ -8255,11 +8231,6 @@ components: $ref: '#/components/schemas/institution' title: UnitInstitutionResponse type: object - execute_request_13: - properties: - data: - $ref: '#/components/schemas/createFee' - type: object UnitFeeResponse: properties: data: @@ -8273,6 +8244,8 @@ components: customerId: type: string tags: + additionalProperties: + type: string type: object status: items: @@ -8291,10 +8264,13 @@ components: type: string type: array type: object - execute_request_14: + UnitListCheckDepositsResponse: properties: data: - $ref: '#/components/schemas/createCheckDeposit' + items: + $ref: '#/components/schemas/check_deposit' + type: array + title: UnitListCheckDepositsResponse type: object UnitCheckDepositResponse: properties: @@ -8316,33 +8292,18 @@ components: type: array title: UnitOrgApiTokensListResponse type: object - execute_request_15: - properties: - data: - $ref: '#/components/schemas/createApiToken' - type: object UnitApiTokenResponse: properties: data: $ref: '#/components/schemas/api_token' title: UnitApiTokenResponse type: object - execute_request_16: - properties: - data: - $ref: '#/components/schemas/createCustomerToken' - type: object UnitCustomerTokenResponse: properties: data: $ref: '#/components/schemas/customer_token' title: UnitCustomerTokenResponse type: object - execute_request_17: - properties: - data: - $ref: '#/components/schemas/createCustomerTokenVerification' - type: object UnitCustomerTokenVerificationResponse: properties: data: @@ -8454,6 +8415,8 @@ components: query: type: string tags: + additionalProperties: + type: string type: object since: type: string @@ -8463,13 +8426,6 @@ components: type: string excludeFees: type: boolean - status: - enum: - - Authorized - - Completed - - Canceled - - Declined - type: string type: items: type: string @@ -8498,6 +8454,8 @@ components: items: $ref: '#/components/schemas/IncludedResource_inner' type: array + meta: + $ref: '#/components/schemas/paginationMeta' title: UnitTransactionsListResponse type: object execute_filter_parameter_17: @@ -8547,11 +8505,6 @@ components: $ref: '#/components/schemas/paginationMeta' title: UnitRepaymentsListResponse type: object - execute_request_18: - properties: - data: - $ref: '#/components/schemas/createRepayment' - type: object execute_filter_parameter_19: properties: accountId: @@ -8591,46 +8544,44 @@ components: checkNumber: type: string type: object - execute_200_response_3: + UnitListCheckPaymentsResponse: properties: data: items: $ref: '#/components/schemas/CheckPayment' type: array + title: UnitListCheckPaymentsResponse type: object - execute_request_19: - properties: - data: - $ref: '#/components/schemas/createCheckPayment' - type: object - execute_request_20_data: + ApproveCheckPaymentRequest_data: properties: type: default: additionalVerification type: string type: object - execute_request_20: + ApproveCheckPaymentRequest: properties: data: - $ref: '#/components/schemas/execute_request_20_data' + $ref: '#/components/schemas/ApproveCheckPaymentRequest_data' + title: ApproveCheckPaymentRequest type: object - execute_request_21_data_attributes: + ReturnCheckPaymentRequest_data_attributes: properties: reason: $ref: '#/components/schemas/returnReason' type: object - execute_request_21_data: + ReturnCheckPaymentRequest_data: properties: type: default: checkPaymentReturn type: string attributes: - $ref: '#/components/schemas/execute_request_21_data_attributes' + $ref: '#/components/schemas/ReturnCheckPaymentRequest_data_attributes' type: object - execute_request_21: + ReturnCheckPaymentRequest: properties: data: - $ref: '#/components/schemas/execute_request_21_data' + $ref: '#/components/schemas/ReturnCheckPaymentRequest_data' + title: ReturnCheckPaymentRequest type: object execute_filter_parameter_20: properties: @@ -8663,17 +8614,14 @@ components: update_application_data: oneOf: - $ref: '#/components/schemas/patchBusinessApplication' + - $ref: '#/components/schemas/patchBusinessApplicationOfficer' + - $ref: '#/components/schemas/patchBusinessApplicationBeneficialOwner' + - $ref: '#/components/schemas/patchSoleProprietorApplication' - $ref: '#/components/schemas/patchIndividualApplication' - $ref: '#/components/schemas/patchTrustApplication' patchBusinessApplication_attributes: additionalProperties: false properties: - officer: - $ref: '#/components/schemas/officer' - beneficialOwners: - items: - $ref: '#/components/schemas/beneficialOwner' - type: array tags: additionalProperties: false maxProperties: 15 @@ -8694,22 +8642,43 @@ components: type: array stockSymbol: type: string + website: + type: string businessVertical: $ref: '#/components/schemas/businessVertical' type: object - patchIndividualApplication_attributes: + patchBusinessApplicationOfficer_attributes_officer: + properties: + occupation: + $ref: '#/components/schemas/occupation' + annualIncome: + $ref: '#/components/schemas/annualIncome' + sourceOfIncome: + $ref: '#/components/schemas/sourceOfIncome' + type: object + patchBusinessApplicationOfficer_attributes: + additionalProperties: false + properties: + officer: + $ref: '#/components/schemas/patchBusinessApplicationOfficer_attributes_officer' + type: object + patchBusinessApplicationBeneficialOwner_attributes: additionalProperties: false properties: - tags: - additionalProperties: false - maxProperties: 15 - type: object occupation: $ref: '#/components/schemas/occupation' annualIncome: $ref: '#/components/schemas/annualIncome' sourceOfIncome: $ref: '#/components/schemas/sourceOfIncome' + type: object + patchSoleProprietorApplication_attributes: + additionalProperties: false + properties: + tags: + additionalProperties: false + maxProperties: 15 + type: object annualRevenue: $ref: '#/components/schemas/soleProprietorshipAnnualRevenue' numberOfEmployees: @@ -8719,6 +8688,20 @@ components: website: type: string type: object + patchIndividualApplication_attributes: + additionalProperties: false + properties: + tags: + additionalProperties: false + maxProperties: 15 + type: object + occupation: + $ref: '#/components/schemas/occupation' + annualIncome: + $ref: '#/components/schemas/annualIncome' + sourceOfIncome: + $ref: '#/components/schemas/sourceOfIncome' + type: object patchTrustApplication_attributes: additionalProperties: false properties: @@ -8961,14 +8944,14 @@ components: contact: $ref: '#/components/schemas/contact' officer: - $ref: '#/components/schemas/officer_1' + $ref: '#/components/schemas/officer' ip: type: string website: type: string beneficialOwners: items: - $ref: '#/components/schemas/beneficialOwner_1' + $ref: '#/components/schemas/beneficialOwner' type: array decisionMethod: enum: @@ -9492,11 +9475,26 @@ components: url: type: string stage: + enum: + - ChooseBusinessOrIndividual + - EnterIndividualInformation + - IndividualPhoneVerification + - IndividualApplicationCreated + - EnterBusinessInformation + - EnterBusinessAdditionalInformation + - EnterOfficerInformation + - BusinessPhoneVerification + - EnterBeneficialOwnersInformation + - BusinessApplicationCreated + - EnterSoleProprietorshipInformation + - EnterSoleProprietorshipBusinessInformation + - SoleProprietorshipPhoneVerification + - SoleProprietorshipApplicationCreated type: string applicantDetails: - $ref: '#/components/schemas/prefilled' + $ref: '#/components/schemas/ApplicationFormPrefill' settingsOverride: - $ref: '#/components/schemas/settingsOverride' + $ref: '#/components/schemas/ApplicationFormSettingsOverride' tags: additionalProperties: false maxProperties: 15 @@ -9528,20 +9526,17 @@ components: data: $ref: '#/components/schemas/applicationFormRelationships_application_data' type: object - createApplicationForm_attributes: + createApplicationForm_data_attributes: additionalProperties: false properties: - email: - format: email - type: string tags: additionalProperties: false maxProperties: 15 type: object applicantDetails: - $ref: '#/components/schemas/prefilled' + $ref: '#/components/schemas/ApplicationFormPrefill' settingsOverride: - $ref: '#/components/schemas/settingsOverride' + $ref: '#/components/schemas/ApplicationFormSettingsOverride' requireIdVerification: $ref: '#/components/schemas/requireIdVerification' allowedApplicationTypes: @@ -9567,6 +9562,19 @@ components: $ref: '#/components/schemas/Relationship' title: createApplicationFormRelationships type: object + createApplicationForm_data: + additionalProperties: false + properties: + type: + default: applicationForm + type: string + attributes: + $ref: '#/components/schemas/createApplicationForm_data_attributes' + relationships: + $ref: '#/components/schemas/createApplicationFormRelationships' + required: + - type + type: object DepositAccount_allOf_attributes_secondaryAccountNumber: properties: routingNumber: @@ -9743,6 +9751,7 @@ components: type: object example: null creditAccountRelationships: + additionalProperties: true properties: customer: $ref: '#/components/schemas/customerLinkage' @@ -9750,7 +9759,6 @@ components: - customer title: creditAccountRelationships type: object - example: null IndividualCustomer_allOf_attributes: properties: createdAt: @@ -10009,11 +10017,6 @@ components: type: object depositProduct: type: string - name: - type: string - overdraftLimit: - minimum: 0 - type: integer type: object updateCreditAccount_attributes: properties: @@ -10021,8 +10024,8 @@ components: additionalProperties: false maxProperties: 15 type: object - name: - type: string + creditLimit: + type: integer type: object limits_attributes_card_limits: properties: @@ -10224,7 +10227,6 @@ components: type: array type: object AchPayment_allOf_attributes: - additionalProperties: true properties: createdAt: format: date-time @@ -10285,6 +10287,7 @@ components: - direction - status type: object + example: null paymentRelationships_customers_data_inner: properties: id: @@ -10441,6 +10444,15 @@ components: relationships: type: object type: object + createPayment_data: + oneOf: + - $ref: '#/components/schemas/CreateAchPayment' + - $ref: '#/components/schemas/CreateAchPaymentCounterparty' + - $ref: '#/components/schemas/CreateAchPaymentPlaid' + - $ref: '#/components/schemas/CreateBookPayment' + - $ref: '#/components/schemas/CreateWirePayment' + - $ref: '#/components/schemas/CreateBillPayment' + - $ref: '#/components/schemas/CreatePushToCardPayment' CreateAchPayment_attributes: additionalProperties: false properties: @@ -10900,6 +10912,10 @@ components: - routingNumber - type type: object + createCounterparty_data: + oneOf: + - $ref: '#/components/schemas/CreateAchCounterparty' + - $ref: '#/components/schemas/CreatePlaidCounterparty' CreateAchCounterparty_attributes: additionalProperties: false properties: @@ -11262,6 +11278,107 @@ components: required: - data type: object + createRecurringPayment_data: + oneOf: + - $ref: '#/components/schemas/createRecurringCreditAchPayment' + - $ref: '#/components/schemas/createRecurringDebitAchPayment' + - $ref: '#/components/schemas/createRecurringCreditBookPayment' + createRecurringCreditAchPayment_attributes: + additionalProperties: false + properties: + amount: + minimum: 1 + type: integer + description: + maxLength: 10 + minLength: 1 + type: string + addenda: + maxLength: 80 + minLength: 1 + type: string + idempotencyKey: + maxLength: 255 + minLength: 1 + type: string + tags: + additionalProperties: false + maxProperties: 15 + type: object + schedule: + $ref: '#/components/schemas/schedule_1' + required: + - amount + - description + - schedule + type: object + createRecurringDebitAchPayment_attributes: + additionalProperties: false + properties: + amount: + minimum: 1 + type: integer + description: + maxLength: 10 + minLength: 1 + type: string + addenda: + maxLength: 80 + minLength: 1 + type: string + idempotencyKey: + maxLength: 255 + minLength: 1 + type: string + sameDay: + default: false + type: boolean + verifyCounterpartyBalance: + default: false + type: boolean + tags: + additionalProperties: false + maxProperties: 15 + type: object + schedule: + $ref: '#/components/schemas/schedule_1' + clearingDaysOverride: + minimum: 0 + type: integer + required: + - amount + - description + - schedule + type: object + createRecurringCreditBookPayment_attributes: + additionalProperties: false + properties: + amount: + minimum: 1 + type: integer + description: + maxLength: 80 + minLength: 1 + type: string + idempotencyKey: + maxLength: 255 + minLength: 1 + type: string + tags: + additionalProperties: false + maxProperties: 15 + type: object + transactionSummaryOverride: + maxLength: 100 + minLength: 1 + type: string + schedule: + $ref: '#/components/schemas/schedule_1' + required: + - amount + - description + - schedule + type: object BusinessDebitCard_allOf_attributes: properties: createdAt: @@ -11454,6 +11571,14 @@ components: - status type: object example: null + createCard_data: + oneOf: + - $ref: '#/components/schemas/CreateIndividualDebitCard' + - $ref: '#/components/schemas/CreateBusinessDebitCard' + - $ref: '#/components/schemas/CreateBusinessCreditCard' + - $ref: '#/components/schemas/CreateIndividualVirtualDebitCard' + - $ref: '#/components/schemas/CreateBusinessVirtualDebitCard' + - $ref: '#/components/schemas/CreateBusinessVirtualCreditCard' CreateIndividualDebitCard_attributes: additionalProperties: false properties: @@ -12111,7 +12236,7 @@ components: - data title: cardRelationship type: object - createReward_attributes: + createReward_data_attributes: additionalProperties: false properties: amount: @@ -12132,6 +12257,21 @@ components: - amount - description type: object + createReward_data: + additionalProperties: false + properties: + type: + default: reward + type: string + attributes: + $ref: '#/components/schemas/createReward_data_attributes' + relationships: + $ref: '#/components/schemas/createRewardRelationships' + required: + - attributes + - relationships + - type + type: object institution_attributes: additionalProperties: false properties: @@ -12151,27 +12291,6 @@ components: - name - routingNumber type: object - createFee_attributes: - additionalProperties: false - properties: - amount: - minimum: 1 - type: integer - description: - maxLength: 50 - type: string - tags: - additionalProperties: false - maxProperties: 15 - type: object - idempotencyKey: - maxLength: 255 - minLength: 1 - type: string - required: - - amount - - description - type: object fee_attributes: additionalProperties: false properties: @@ -12278,7 +12397,7 @@ components: required: - data type: object - createCheckDeposit_attributes: + createCheckDeposit_data_attributes: additionalProperties: false properties: amount: @@ -12300,6 +12419,22 @@ components: - amount - description type: object + createCheckDeposit_data: + properties: + type: + default: checkDeposit + enum: + - checkDeposit + type: string + attributes: + $ref: '#/components/schemas/createCheckDeposit_data_attributes' + relationships: + $ref: '#/components/schemas/createCheckDepositRelationships' + required: + - attributes + - relationships + - type + type: object patchCheckDeposit_attributes: additionalProperties: false properties: @@ -12312,7 +12447,6 @@ components: type: object type: object api_token_attributes: - additionalProperties: true properties: createdAt: format: date-time @@ -12329,7 +12463,7 @@ components: required: - createdAt type: object - createApiToken_attributes_resources_inner: + createApiToken_data_attributes_resources_inner: properties: type: enum: @@ -12341,7 +12475,7 @@ components: $ref: '#/components/schemas/identifier' type: array type: object - createApiToken_attributes: + createApiToken_data_attributes: additionalProperties: false properties: scope: @@ -12355,14 +12489,26 @@ components: type: string resources: items: - $ref: '#/components/schemas/createApiToken_attributes_resources_inner' + $ref: '#/components/schemas/createApiToken_data_attributes_resources_inner' minItems: 1 type: array required: - description - expiration type: object - createCustomerToken_attributes: + createApiToken_data: + additionalProperties: false + properties: + type: + default: apiToken + type: string + attributes: + $ref: '#/components/schemas/createApiToken_data_attributes' + required: + - attributes + - type + type: object + createCustomerToken_data_attributes: properties: scope: type: string @@ -12376,12 +12522,20 @@ components: type: string resources: items: - $ref: '#/components/schemas/createApiToken_attributes_resources_inner' + $ref: '#/components/schemas/createApiToken_data_attributes_resources_inner' minItems: 1 type: array upgradableScope: type: string type: object + createCustomerToken_data: + properties: + type: + default: customerToken + type: string + attributes: + $ref: '#/components/schemas/createCustomerToken_data_attributes' + type: object customer_token_attributes: properties: token: @@ -12389,7 +12543,7 @@ components: expiresIn: type: integer type: object - createCustomerTokenVerification_attributes: + createCustomerTokenVerification_data_attributes: additionalProperties: false properties: channel: @@ -12450,6 +12604,18 @@ components: required: - channel type: object + createCustomerTokenVerification_data: + additionalProperties: false + properties: + type: + default: customerTokenVerification + type: string + attributes: + $ref: '#/components/schemas/createCustomerTokenVerification_data_attributes' + required: + - attributes + - type + type: object customer_token_verification_attributes: properties: verificationToken: @@ -12460,7 +12626,7 @@ components: createdAt: format: date-time type: string - lebel: + label: type: string url: type: string @@ -12478,6 +12644,8 @@ components: type: string token: type: string + subscriptionType: + type: string type: object updateUnitRequest_data_attributes: properties: @@ -12491,6 +12659,23 @@ components: attributes: $ref: '#/components/schemas/updateUnitRequest_data_attributes' type: object + atm_location_attributes: + properties: + network: + type: string + locationName: + type: string + coordinates: + $ref: '#/components/schemas/coordinates' + address: + $ref: '#/components/schemas/address' + distance: + type: integer + surchargeFree: + type: boolean + acceptDeposits: + type: boolean + type: object OriginatedAchTransaction_allOf_attributes: properties: createdAt: diff --git a/build.gradle b/build.gradle index 957b714f..331dfd8b 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'co.unit.sdk' -version = '0.0.1' +version = '0.0.2' buildscript { repositories { @@ -91,7 +91,7 @@ if(hasProperty('target') && target == 'android') { maven(MavenPublication) { groupId = 'co.unit' artifactId = 'java-sdk' - version = '0.0.1' + version = '0.0.2' from components.java pom { diff --git a/build.sbt b/build.sbt index 953d7bc5..c0c7313e 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "org.openapitools", name := "openapi-java-client", - version := "0.2.0", + version := "0.0.2", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/pom.xml b/pom.xml index 82eef4a9..89c8c76c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ openapi-java-client jar openapi-java-client - 0.2.0 + 0.0.2 https://github.com/openapitools/openapi-generator OpenAPI Java diff --git a/src/main/java/org/openapitools/client/ApiCallback.java b/src/main/java/org/openapitools/client/ApiCallback.java index ac910c4f..4d99cf06 100644 --- a/src/main/java/org/openapitools/client/ApiCallback.java +++ b/src/main/java/org/openapitools/client/ApiCallback.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/ApiClient.java b/src/main/java/org/openapitools/client/ApiClient.java index 192f5c2c..7b2d14cf 100644 --- a/src/main/java/org/openapitools/client/ApiClient.java +++ b/src/main/java/org/openapitools/client/ApiClient.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -140,7 +140,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/0.2.0/java"); + setUserAgent("OpenAPI-Generator/0.0.2/java"); authentications = new HashMap(); } diff --git a/src/main/java/org/openapitools/client/ApiException.java b/src/main/java/org/openapitools/client/ApiException.java index 6b9668fc..7e9fce2c 100644 --- a/src/main/java/org/openapitools/client/ApiException.java +++ b/src/main/java/org/openapitools/client/ApiException.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/ApiResponse.java b/src/main/java/org/openapitools/client/ApiResponse.java index d92dc734..73c0c962 100644 --- a/src/main/java/org/openapitools/client/ApiResponse.java +++ b/src/main/java/org/openapitools/client/ApiResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/Configuration.java b/src/main/java/org/openapitools/client/Configuration.java index 5b6de771..82f519de 100644 --- a/src/main/java/org/openapitools/client/Configuration.java +++ b/src/main/java/org/openapitools/client/Configuration.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,7 +15,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "0.2.0"; + public static final String VERSION = "0.0.2"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/org/openapitools/client/GzipRequestInterceptor.java b/src/main/java/org/openapitools/client/GzipRequestInterceptor.java index 4b311ce6..6f6efd15 100644 --- a/src/main/java/org/openapitools/client/GzipRequestInterceptor.java +++ b/src/main/java/org/openapitools/client/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/JSON.java b/src/main/java/org/openapitools/client/JSON.java index 54d06199..cb9728e4 100644 --- a/src/main/java/org/openapitools/client/JSON.java +++ b/src/main/java/org/openapitools/client/JSON.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -855,9 +855,11 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationForm.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormAdditionalDisclosuresInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormPrefill.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormRelationshipsApplication.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormRelationshipsApplicationData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormSettingsOverride.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationshipsBeneficialOwners.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationshipsBeneficialOwnersDataInner.CustomTypeAdapterFactory()); @@ -867,9 +869,15 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationshipsTrusteesDataInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApproveAuthorizationRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApproveAuthorizationRequestAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApproveCheckPaymentRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApproveCheckPaymentRequestData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArchiveCustomerRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArchiveCustomerRequestAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Astra.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmAuthorizationRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmAuthorizationRequestAllOfAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmLocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmLocationAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmTransaction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmTransactionAllOfAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Authorization.CustomTypeAdapterFactory()); @@ -886,7 +894,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BankRepaymentTransaction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BankRepaymentTransactionAllOfAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BeneficialOwner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BeneficialOwner1.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Beneficiary.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BillPayTransaction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BillPayment.CustomTypeAdapterFactory()); @@ -910,6 +917,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessVirtualCreditCard.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessVirtualDebitCard.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessVirtualDebitCardAllOfAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CancelApplicationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CancelApplicationRequestData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CancelApplicationRequestDataAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardLevelLimits.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardRelationship.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardRelationships.CustomTypeAdapterFactory()); @@ -976,12 +986,14 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchRepaymentAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchRepaymentRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiTokenAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiTokenAttributesResourcesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiTokenData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiTokenDataAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiTokenDataAttributesResourcesInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplication.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationForm.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationFormAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationFormData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationFormDataAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationFormRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBeneficialOwner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBillPayment.CustomTypeAdapterFactory()); @@ -1001,26 +1013,28 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessVirtualDebitCard.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessVirtualDebitCardAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCard.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCardData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCardRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckDeposit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckDepositAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckDepositData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckDepositDataAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckDepositRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckPayment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCounterparty.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCounterpartyData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCounterpartyRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCreditAccount.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCreditAccountAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCreditAccountRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenDataAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenVerification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenVerificationAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenVerificationData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenVerificationDataAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateDepositAccount.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateDepositAccountAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateDepositAccountRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateFee.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateFeeAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateFeeRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualApplication.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualApplicationAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualDebitCard.CustomTypeAdapterFactory()); @@ -1029,17 +1043,26 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualVirtualDebitCardAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateOfficer.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePayment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePaymentData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePlaidCounterparty.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePlaidCounterpartyAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePowerOfAttorneyAgent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePushToCardPayment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePushToCardPaymentAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePushToCardPaymentAttributesConfiguration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringCreditAchPayment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringCreditAchPaymentAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringCreditBookPayment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringCreditBookPaymentAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringDebitAchPayment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringDebitAchPaymentAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringPayment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringPaymentData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRepayment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRepaymentData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateReward.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRewardAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRewardData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRewardDataAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRewardRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateSoleProprietorApplication.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateSoleProprietorApplicationAttributes.CustomTypeAdapterFactory()); @@ -1100,10 +1123,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DocumentsRelationshipDataInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EvaluationParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Event.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Execute200Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Execute200Response1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Execute200Response2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Execute200Response3.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter1.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter10.CustomTypeAdapterFactory()); @@ -1125,34 +1144,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter7.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter8.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter9.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest10.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest11.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest12.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest13.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest14.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest15.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest16.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest17.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest18.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest19.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest20.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest20Data.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest21.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest21Data.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest21DataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest3.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest4.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest5.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest5Attributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest6.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest7.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest8.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequest9.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequestData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteRequestDataAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Fee.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FeeAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FeeRelationships.CustomTypeAdapterFactory()); @@ -1186,9 +1177,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LimitsAttributesCardTotalsDaily.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ListPageParametersObject.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Merchant.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MonthlySchedule.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NegativeBalanceCoverageTransaction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Officer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Officer1.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OrgRelationship.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OrgRelationshipData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OriginatedAchTransaction.CustomTypeAdapterFactory()); @@ -1205,6 +1196,11 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBookTransactionRelationships.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplication.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationBeneficialOwner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationBeneficialOwnerAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationOfficer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationOfficerAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationOfficerAttributesOfficer.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessCreditCard.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessDebitCard.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessDebitCardAttributes.CustomTypeAdapterFactory()); @@ -1222,6 +1218,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchIndividualDebitCardAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchIndividualVirtualDebitCard.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchIndividualVirtualDebitCardAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchSoleProprietorApplication.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchSoleProprietorApplicationAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchTransactionTags.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchTransactionTagsAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchTrustApplication.CustomTypeAdapterFactory()); @@ -1236,7 +1234,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PinStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PinStatusAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PowerOfAttorneyAgent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Prefilled.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PurchaseAuthorizationRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PurchaseAuthorizationRequestAllOfAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PurchaseTransaction.CustomTypeAdapterFactory()); @@ -1290,6 +1287,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RepaymentRelationshipData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RequireIdVerification.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ResponseContact.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnCheckPaymentRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnCheckPaymentRequestData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnCheckPaymentRequestDataAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedAchTransaction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedAchTransactionAllOfAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedCheckDepositTransaction.CustomTypeAdapterFactory()); @@ -1309,7 +1309,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RewardTransaction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RewardTransactionAllOfAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Schedule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SettingsOverride.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Schedule1.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SettlementTransaction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SponsoredInterestTransaction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Statement.CustomTypeAdapterFactory()); @@ -1370,6 +1370,11 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitGetAccountLimitsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitInstitutionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListApplicationsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListAuthorizationRequestsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListAuthorizationsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListCheckDepositsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListCheckPaymentsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListDocumentsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitOrgApiTokensListResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitPaymentResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitPaymentResponseWithIncluded.CustomTypeAdapterFactory()); @@ -1417,6 +1422,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateUnitRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateUnitRequestData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateUnitRequestDataAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.VerifyDocument.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Webhook.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WebhookAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WireCounterparty.CustomTypeAdapterFactory()); diff --git a/src/main/java/org/openapitools/client/Pair.java b/src/main/java/org/openapitools/client/Pair.java index 4530c4ac..34deb99d 100644 --- a/src/main/java/org/openapitools/client/Pair.java +++ b/src/main/java/org/openapitools/client/Pair.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/ProgressRequestBody.java b/src/main/java/org/openapitools/client/ProgressRequestBody.java index 52aca337..87df59cb 100644 --- a/src/main/java/org/openapitools/client/ProgressRequestBody.java +++ b/src/main/java/org/openapitools/client/ProgressRequestBody.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/ProgressResponseBody.java b/src/main/java/org/openapitools/client/ProgressResponseBody.java index 0cbe7565..41ad1ebe 100644 --- a/src/main/java/org/openapitools/client/ProgressResponseBody.java +++ b/src/main/java/org/openapitools/client/ProgressResponseBody.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/StringUtil.java b/src/main/java/org/openapitools/client/StringUtil.java index d0793dbb..97c0874b 100644 --- a/src/main/java/org/openapitools/client/StringUtil.java +++ b/src/main/java/org/openapitools/client/StringUtil.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/ActivateControlAgreementForAccountApi.java b/src/main/java/org/openapitools/client/api/ActivateControlAgreementForAccountApi.java index 8d190948..fe30b431 100644 --- a/src/main/java/org/openapitools/client/api/ActivateControlAgreementForAccountApi.java +++ b/src/main/java/org/openapitools/client/api/ActivateControlAgreementForAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/AdvanceReceivedPaymentApi.java b/src/main/java/org/openapitools/client/api/AdvanceReceivedPaymentApi.java index 878acd8f..bbe2678c 100644 --- a/src/main/java/org/openapitools/client/api/AdvanceReceivedPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/AdvanceReceivedPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/ApproveAuthorizationRequestApi.java b/src/main/java/org/openapitools/client/api/ApproveAuthorizationRequestApi.java index cb177307..9dd12a97 100644 --- a/src/main/java/org/openapitools/client/api/ApproveAuthorizationRequestApi.java +++ b/src/main/java/org/openapitools/client/api/ApproveAuthorizationRequestApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest10; +import org.openapitools.client.model.ApproveAuthorizationRequest; import org.openapitools.client.model.UnitAuthorizationRequestResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param authorizationId ID of the authorization request to approve (required) - * @param executeRequest10 Approve Authorization Request Request (required) + * @param approveAuthorizationRequest Approve Authorization Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 200 Successful Response - */ - public okhttp3.Call executeCall(String authorizationId, ExecuteRequest10 executeRequest10, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(String authorizationId, ExecuteRequest10 execute basePath = null; } - Object localVarPostBody = executeRequest10; + Object localVarPostBody = approveAuthorizationRequest; // create path and map variables String localVarPath = "/authorization-requests/{authorizationId}/approve" @@ -133,18 +133,18 @@ public okhttp3.Call executeCall(String authorizationId, ExecuteRequest10 execute } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String authorizationId, ExecuteRequest10 executeRequest10, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'authorizationId' is set if (authorizationId == null) { throw new ApiException("Missing the required parameter 'authorizationId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest10' is set - if (executeRequest10 == null) { - throw new ApiException("Missing the required parameter 'executeRequest10' when calling execute(Async)"); + // verify the required parameter 'approveAuthorizationRequest' is set + if (approveAuthorizationRequest == null) { + throw new ApiException("Missing the required parameter 'approveAuthorizationRequest' when calling execute(Async)"); } - return executeCall(authorizationId, executeRequest10, _callback); + return executeCall(authorizationId, approveAuthorizationRequest, _callback); } @@ -152,7 +152,7 @@ private okhttp3.Call executeValidateBeforeCall(String authorizationId, ExecuteRe * Approve Authorization Request by Id * Approve a Authorization Request via API * @param authorizationId ID of the authorization request to approve (required) - * @param executeRequest10 Approve Authorization Request Request (required) + * @param approveAuthorizationRequest Approve Authorization Request (required) * @return UnitAuthorizationRequestResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -161,8 +161,8 @@ private okhttp3.Call executeValidateBeforeCall(String authorizationId, ExecuteRe 200 Successful Response - */ - public UnitAuthorizationRequestResponse execute(String authorizationId, ExecuteRequest10 executeRequest10) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(authorizationId, executeRequest10); + public UnitAuthorizationRequestResponse execute(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(authorizationId, approveAuthorizationRequest); return localVarResp.getData(); } @@ -170,7 +170,7 @@ public UnitAuthorizationRequestResponse execute(String authorizationId, ExecuteR * Approve Authorization Request by Id * Approve a Authorization Request via API * @param authorizationId ID of the authorization request to approve (required) - * @param executeRequest10 Approve Authorization Request Request (required) + * @param approveAuthorizationRequest Approve Authorization Request (required) * @return ApiResponse<UnitAuthorizationRequestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +179,8 @@ public UnitAuthorizationRequestResponse execute(String authorizationId, ExecuteR 200 Successful Response - */ - public ApiResponse executeWithHttpInfo(String authorizationId, ExecuteRequest10 executeRequest10) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, executeRequest10, null); + public ApiResponse executeWithHttpInfo(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, approveAuthorizationRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,7 +189,7 @@ public ApiResponse executeWithHttpInfo(String * Approve Authorization Request by Id (asynchronously) * Approve a Authorization Request via API * @param authorizationId ID of the authorization request to approve (required) - * @param executeRequest10 Approve Authorization Request Request (required) + * @param approveAuthorizationRequest Approve Authorization Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -199,9 +199,9 @@ public ApiResponse executeWithHttpInfo(String 200 Successful Response - */ - public okhttp3.Call executeAsync(String authorizationId, ExecuteRequest10 executeRequest10, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, executeRequest10, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, approveAuthorizationRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/ApproveCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/ApproveCheckPaymentApi.java index 3ea1418e..be8c6fa4 100644 --- a/src/main/java/org/openapitools/client/api/ApproveCheckPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/ApproveCheckPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest20; +import org.openapitools.client.model.ApproveCheckPaymentRequest; import org.openapitools.client.model.UnitCheckPaymentResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param checkPaymentId ID of the check payment to approve (required) - * @param executeRequest20 Approve Check Payment Request (required) + * @param approveCheckPaymentRequest Approve Check Payment Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 200 Successful Response - */ - public okhttp3.Call executeCall(String checkPaymentId, ExecuteRequest20 executeRequest20, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(String checkPaymentId, ExecuteRequest20 executeR basePath = null; } - Object localVarPostBody = executeRequest20; + Object localVarPostBody = approveCheckPaymentRequest; // create path and map variables String localVarPath = "/check-payments/{checkPaymentId}/approve" @@ -133,18 +133,18 @@ public okhttp3.Call executeCall(String checkPaymentId, ExecuteRequest20 executeR } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ExecuteRequest20 executeRequest20, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'checkPaymentId' is set if (checkPaymentId == null) { throw new ApiException("Missing the required parameter 'checkPaymentId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest20' is set - if (executeRequest20 == null) { - throw new ApiException("Missing the required parameter 'executeRequest20' when calling execute(Async)"); + // verify the required parameter 'approveCheckPaymentRequest' is set + if (approveCheckPaymentRequest == null) { + throw new ApiException("Missing the required parameter 'approveCheckPaymentRequest' when calling execute(Async)"); } - return executeCall(checkPaymentId, executeRequest20, _callback); + return executeCall(checkPaymentId, approveCheckPaymentRequest, _callback); } @@ -152,7 +152,7 @@ private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ExecuteReq * Approve Check Payment by Id * Approve a Check Payment via API * @param checkPaymentId ID of the check payment to approve (required) - * @param executeRequest20 Approve Check Payment Request (required) + * @param approveCheckPaymentRequest Approve Check Payment Request (required) * @return UnitCheckPaymentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -161,8 +161,8 @@ private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ExecuteReq 200 Successful Response - */ - public UnitCheckPaymentResponse execute(String checkPaymentId, ExecuteRequest20 executeRequest20) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId, executeRequest20); + public UnitCheckPaymentResponse execute(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId, approveCheckPaymentRequest); return localVarResp.getData(); } @@ -170,7 +170,7 @@ public UnitCheckPaymentResponse execute(String checkPaymentId, ExecuteRequest20 * Approve Check Payment by Id * Approve a Check Payment via API * @param checkPaymentId ID of the check payment to approve (required) - * @param executeRequest20 Approve Check Payment Request (required) + * @param approveCheckPaymentRequest Approve Check Payment Request (required) * @return ApiResponse<UnitCheckPaymentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +179,8 @@ public UnitCheckPaymentResponse execute(String checkPaymentId, ExecuteRequest20 200 Successful Response - */ - public ApiResponse executeWithHttpInfo(String checkPaymentId, ExecuteRequest20 executeRequest20) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, executeRequest20, null); + public ApiResponse executeWithHttpInfo(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, approveCheckPaymentRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,7 +189,7 @@ public ApiResponse executeWithHttpInfo(String checkPay * Approve Check Payment by Id (asynchronously) * Approve a Check Payment via API * @param checkPaymentId ID of the check payment to approve (required) - * @param executeRequest20 Approve Check Payment Request (required) + * @param approveCheckPaymentRequest Approve Check Payment Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -199,9 +199,9 @@ public ApiResponse executeWithHttpInfo(String checkPay 200 Successful Response - */ - public okhttp3.Call executeAsync(String checkPaymentId, ExecuteRequest20 executeRequest20, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, executeRequest20, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, approveCheckPaymentRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/ArchiveCustomerApi.java b/src/main/java/org/openapitools/client/api/ArchiveCustomerApi.java index b085f617..624d6d09 100644 --- a/src/main/java/org/openapitools/client/api/ArchiveCustomerApi.java +++ b/src/main/java/org/openapitools/client/api/ArchiveCustomerApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest5; +import org.openapitools.client.model.ArchiveCustomerRequest; import org.openapitools.client.model.UnitCustomerResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param customerId ID of the customer to archive (required) - * @param executeRequest5 Update Payment Request (required) + * @param archiveCustomerRequest Archive Customer Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 200 Successful Response - */ - public okhttp3.Call executeCall(String customerId, ExecuteRequest5 executeRequest5, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String customerId, ArchiveCustomerRequest archiveCustomerRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(String customerId, ExecuteRequest5 executeReques basePath = null; } - Object localVarPostBody = executeRequest5; + Object localVarPostBody = archiveCustomerRequest; // create path and map variables String localVarPath = "/customers/{customerId}/archive" @@ -133,18 +133,18 @@ public okhttp3.Call executeCall(String customerId, ExecuteRequest5 executeReques } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String customerId, ExecuteRequest5 executeRequest5, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String customerId, ArchiveCustomerRequest archiveCustomerRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customerId' is set if (customerId == null) { throw new ApiException("Missing the required parameter 'customerId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest5' is set - if (executeRequest5 == null) { - throw new ApiException("Missing the required parameter 'executeRequest5' when calling execute(Async)"); + // verify the required parameter 'archiveCustomerRequest' is set + if (archiveCustomerRequest == null) { + throw new ApiException("Missing the required parameter 'archiveCustomerRequest' when calling execute(Async)"); } - return executeCall(customerId, executeRequest5, _callback); + return executeCall(customerId, archiveCustomerRequest, _callback); } @@ -152,7 +152,7 @@ private okhttp3.Call executeValidateBeforeCall(String customerId, ExecuteRequest * Archive Customer by Id * Archive a Customer via API * @param customerId ID of the customer to archive (required) - * @param executeRequest5 Update Payment Request (required) + * @param archiveCustomerRequest Archive Customer Request (required) * @return UnitCustomerResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -161,8 +161,8 @@ private okhttp3.Call executeValidateBeforeCall(String customerId, ExecuteRequest 200 Successful Response - */ - public UnitCustomerResponse execute(String customerId, ExecuteRequest5 executeRequest5) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(customerId, executeRequest5); + public UnitCustomerResponse execute(String customerId, ArchiveCustomerRequest archiveCustomerRequest) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(customerId, archiveCustomerRequest); return localVarResp.getData(); } @@ -170,7 +170,7 @@ public UnitCustomerResponse execute(String customerId, ExecuteRequest5 executeRe * Archive Customer by Id * Archive a Customer via API * @param customerId ID of the customer to archive (required) - * @param executeRequest5 Update Payment Request (required) + * @param archiveCustomerRequest Archive Customer Request (required) * @return ApiResponse<UnitCustomerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +179,8 @@ public UnitCustomerResponse execute(String customerId, ExecuteRequest5 executeRe 200 Successful Response - */ - public ApiResponse executeWithHttpInfo(String customerId, ExecuteRequest5 executeRequest5) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, executeRequest5, null); + public ApiResponse executeWithHttpInfo(String customerId, ArchiveCustomerRequest archiveCustomerRequest) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, archiveCustomerRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,7 +189,7 @@ public ApiResponse executeWithHttpInfo(String customerId, * Archive Customer by Id (asynchronously) * Archive a Customer via API * @param customerId ID of the customer to archive (required) - * @param executeRequest5 Update Payment Request (required) + * @param archiveCustomerRequest Archive Customer Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -199,9 +199,9 @@ public ApiResponse executeWithHttpInfo(String customerId, 200 Successful Response - */ - public okhttp3.Call executeAsync(String customerId, ExecuteRequest5 executeRequest5, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String customerId, ArchiveCustomerRequest archiveCustomerRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, executeRequest5, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, archiveCustomerRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CancelApplicationApi.java b/src/main/java/org/openapitools/client/api/CancelApplicationApi.java index a81452f4..d2d2a8d5 100644 --- a/src/main/java/org/openapitools/client/api/CancelApplicationApi.java +++ b/src/main/java/org/openapitools/client/api/CancelApplicationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest; +import org.openapitools.client.model.CancelApplicationRequest; import org.openapitools.client.model.UnitCancelApplicationResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param applicationId ID of the application to get (required) - * @param executeRequest Cancel Application Request (required) + * @param cancelApplicationRequest Cancel Application Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(String applicationId, ExecuteRequest executeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String applicationId, CancelApplicationRequest cancelApplicationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(String applicationId, ExecuteRequest executeRequ basePath = null; } - Object localVarPostBody = executeRequest; + Object localVarPostBody = cancelApplicationRequest; // create path and map variables String localVarPath = "/applications/{applicationId}/cancel" @@ -133,18 +133,18 @@ public okhttp3.Call executeCall(String applicationId, ExecuteRequest executeRequ } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, ExecuteRequest executeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String applicationId, CancelApplicationRequest cancelApplicationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'applicationId' is set if (applicationId == null) { throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest' is set - if (executeRequest == null) { - throw new ApiException("Missing the required parameter 'executeRequest' when calling execute(Async)"); + // verify the required parameter 'cancelApplicationRequest' is set + if (cancelApplicationRequest == null) { + throw new ApiException("Missing the required parameter 'cancelApplicationRequest' when calling execute(Async)"); } - return executeCall(applicationId, executeRequest, _callback); + return executeCall(applicationId, cancelApplicationRequest, _callback); } @@ -152,7 +152,7 @@ private okhttp3.Call executeValidateBeforeCall(String applicationId, ExecuteRequ * Cancel Application by Id * Cancel a Application via API * @param applicationId ID of the application to get (required) - * @param executeRequest Cancel Application Request (required) + * @param cancelApplicationRequest Cancel Application Request (required) * @return UnitCancelApplicationResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -161,8 +161,8 @@ private okhttp3.Call executeValidateBeforeCall(String applicationId, ExecuteRequ 201 Successful Response - */ - public UnitCancelApplicationResponse execute(String applicationId, ExecuteRequest executeRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, executeRequest); + public UnitCancelApplicationResponse execute(String applicationId, CancelApplicationRequest cancelApplicationRequest) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(applicationId, cancelApplicationRequest); return localVarResp.getData(); } @@ -170,7 +170,7 @@ public UnitCancelApplicationResponse execute(String applicationId, ExecuteReques * Cancel Application by Id * Cancel a Application via API * @param applicationId ID of the application to get (required) - * @param executeRequest Cancel Application Request (required) + * @param cancelApplicationRequest Cancel Application Request (required) * @return ApiResponse<UnitCancelApplicationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +179,8 @@ public UnitCancelApplicationResponse execute(String applicationId, ExecuteReques 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(String applicationId, ExecuteRequest executeRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, executeRequest, null); + public ApiResponse executeWithHttpInfo(String applicationId, CancelApplicationRequest cancelApplicationRequest) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, cancelApplicationRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,7 +189,7 @@ public ApiResponse executeWithHttpInfo(String app * Cancel Application by Id (asynchronously) * Cancel a Application via API * @param applicationId ID of the application to get (required) - * @param executeRequest Cancel Application Request (required) + * @param cancelApplicationRequest Cancel Application Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -199,9 +199,9 @@ public ApiResponse executeWithHttpInfo(String app 201 Successful Response - */ - public okhttp3.Call executeAsync(String applicationId, ExecuteRequest executeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String applicationId, CancelApplicationRequest cancelApplicationRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, executeRequest, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, cancelApplicationRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CancelCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/CancelCheckPaymentApi.java index 7e12417e..50dedc8e 100644 --- a/src/main/java/org/openapitools/client/api/CancelCheckPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/CancelCheckPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/CancelPaymentApi.java b/src/main/java/org/openapitools/client/api/CancelPaymentApi.java index 05612cc1..d17a5944 100644 --- a/src/main/java/org/openapitools/client/api/CancelPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/CancelPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/CloseACardApi.java b/src/main/java/org/openapitools/client/api/CloseACardApi.java index 3f2a4ed6..38a92b27 100644 --- a/src/main/java/org/openapitools/client/api/CloseACardApi.java +++ b/src/main/java/org/openapitools/client/api/CloseACardApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/CloseAnAccountApi.java b/src/main/java/org/openapitools/client/api/CloseAnAccountApi.java index 59e34f49..6d632665 100644 --- a/src/main/java/org/openapitools/client/api/CloseAnAccountApi.java +++ b/src/main/java/org/openapitools/client/api/CloseAnAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest4; +import org.openapitools.client.model.CloseAccountRequest; import org.openapitools.client.model.UnitAccountResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param accountId ID of the account to close (required) - * @param executeRequest4 Close Account Request (required) + * @param closeAccountRequest Close Account Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -87,7 +87,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 0 - */ - public okhttp3.Call executeCall(String accountId, ExecuteRequest4 executeRequest4, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String accountId, CloseAccountRequest closeAccountRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -101,7 +101,7 @@ public okhttp3.Call executeCall(String accountId, ExecuteRequest4 executeRequest basePath = null; } - Object localVarPostBody = executeRequest4; + Object localVarPostBody = closeAccountRequest; // create path and map variables String localVarPath = "/accounts/{accountId}/close" @@ -134,18 +134,18 @@ public okhttp3.Call executeCall(String accountId, ExecuteRequest4 executeRequest } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, ExecuteRequest4 executeRequest4, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String accountId, CloseAccountRequest closeAccountRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest4' is set - if (executeRequest4 == null) { - throw new ApiException("Missing the required parameter 'executeRequest4' when calling execute(Async)"); + // verify the required parameter 'closeAccountRequest' is set + if (closeAccountRequest == null) { + throw new ApiException("Missing the required parameter 'closeAccountRequest' when calling execute(Async)"); } - return executeCall(accountId, executeRequest4, _callback); + return executeCall(accountId, closeAccountRequest, _callback); } @@ -153,7 +153,7 @@ private okhttp3.Call executeValidateBeforeCall(String accountId, ExecuteRequest4 * Close an Account by Id * Close an Account via API * @param accountId ID of the account to close (required) - * @param executeRequest4 Close Account Request (required) + * @param closeAccountRequest Close Account Request (required) * @return UnitAccountResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -163,8 +163,8 @@ private okhttp3.Call executeValidateBeforeCall(String accountId, ExecuteRequest4 0 - */ - public UnitAccountResponse execute(String accountId, ExecuteRequest4 executeRequest4) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId, executeRequest4); + public UnitAccountResponse execute(String accountId, CloseAccountRequest closeAccountRequest) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(accountId, closeAccountRequest); return localVarResp.getData(); } @@ -172,7 +172,7 @@ public UnitAccountResponse execute(String accountId, ExecuteRequest4 executeRequ * Close an Account by Id * Close an Account via API * @param accountId ID of the account to close (required) - * @param executeRequest4 Close Account Request (required) + * @param closeAccountRequest Close Account Request (required) * @return ApiResponse<UnitAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -182,8 +182,8 @@ public UnitAccountResponse execute(String accountId, ExecuteRequest4 executeRequ 0 - */ - public ApiResponse executeWithHttpInfo(String accountId, ExecuteRequest4 executeRequest4) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, executeRequest4, null); + public ApiResponse executeWithHttpInfo(String accountId, CloseAccountRequest closeAccountRequest) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, closeAccountRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -192,7 +192,7 @@ public ApiResponse executeWithHttpInfo(String accountId, Ex * Close an Account by Id (asynchronously) * Close an Account via API * @param accountId ID of the account to close (required) - * @param executeRequest4 Close Account Request (required) + * @param closeAccountRequest Close Account Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -203,9 +203,9 @@ public ApiResponse executeWithHttpInfo(String accountId, Ex 0 - */ - public okhttp3.Call executeAsync(String accountId, ExecuteRequest4 executeRequest4, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String accountId, CloseAccountRequest closeAccountRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, executeRequest4, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, closeAccountRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/ConfirmCheckDepositApi.java b/src/main/java/org/openapitools/client/api/ConfirmCheckDepositApi.java index d341ed80..a3318ad7 100644 --- a/src/main/java/org/openapitools/client/api/ConfirmCheckDepositApi.java +++ b/src/main/java/org/openapitools/client/api/ConfirmCheckDepositApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/CreateACardApi.java b/src/main/java/org/openapitools/client/api/CreateACardApi.java index 6eeca764..55228288 100644 --- a/src/main/java/org/openapitools/client/api/CreateACardApi.java +++ b/src/main/java/org/openapitools/client/api/CreateACardApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest9; +import org.openapitools.client.model.CreateCard; import org.openapitools.client.model.UnitCardResponse; import java.lang.reflect.Type; @@ -75,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest9 Create Card Request (required) + * @param createCard Create Card Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,7 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(ExecuteRequest9 executeRequest9, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(CreateCard createCard, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -99,7 +99,7 @@ public okhttp3.Call executeCall(ExecuteRequest9 executeRequest9, final ApiCallba basePath = null; } - Object localVarPostBody = executeRequest9; + Object localVarPostBody = createCard; // create path and map variables String localVarPath = "/cards"; @@ -131,20 +131,20 @@ public okhttp3.Call executeCall(ExecuteRequest9 executeRequest9, final ApiCallba } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest9 executeRequest9, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest9' is set - if (executeRequest9 == null) { - throw new ApiException("Missing the required parameter 'executeRequest9' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(CreateCard createCard, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createCard' is set + if (createCard == null) { + throw new ApiException("Missing the required parameter 'createCard' when calling execute(Async)"); } - return executeCall(executeRequest9, _callback); + return executeCall(createCard, _callback); } /** * Create a Card * Create a Card via API - * @param executeRequest9 Create Card Request (required) + * @param createCard Create Card Request (required) * @return UnitCardResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -153,15 +153,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest9 executeRequest9, 201 Successful Response - */ - public UnitCardResponse execute(ExecuteRequest9 executeRequest9) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest9); + public UnitCardResponse execute(CreateCard createCard) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(createCard); return localVarResp.getData(); } /** * Create a Card * Create a Card via API - * @param executeRequest9 Create Card Request (required) + * @param createCard Create Card Request (required) * @return ApiResponse<UnitCardResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ public UnitCardResponse execute(ExecuteRequest9 executeRequest9) throws ApiExcep 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest9 executeRequest9) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest9, null); + public ApiResponse executeWithHttpInfo(CreateCard createCard) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(createCard, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -179,7 +179,7 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest9 execute /** * Create a Card (asynchronously) * Create a Card via API - * @param executeRequest9 Create Card Request (required) + * @param createCard Create Card Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -189,9 +189,9 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest9 execute 201 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteRequest9 executeRequest9, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(CreateCard createCard, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest9, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(createCard, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateADocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/CreateADocumentForAnApplicationApi.java index 363759f7..42a04543 100644 --- a/src/main/java/org/openapitools/client/api/CreateADocumentForAnApplicationApi.java +++ b/src/main/java/org/openapitools/client/api/CreateADocumentForAnApplicationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/CreateAPaymentApi.java b/src/main/java/org/openapitools/client/api/CreateAPaymentApi.java index 945ab44a..b7212e89 100644 --- a/src/main/java/org/openapitools/client/api/CreateAPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/CreateAPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest6; +import org.openapitools.client.model.CreatePayment; import org.openapitools.client.model.UnitPaymentResponse; import java.lang.reflect.Type; @@ -75,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest6 Create Payment Request (required) + * @param createPayment Create Payment Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,7 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(ExecuteRequest6 executeRequest6, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(CreatePayment createPayment, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -99,7 +99,7 @@ public okhttp3.Call executeCall(ExecuteRequest6 executeRequest6, final ApiCallba basePath = null; } - Object localVarPostBody = executeRequest6; + Object localVarPostBody = createPayment; // create path and map variables String localVarPath = "/payments"; @@ -131,20 +131,20 @@ public okhttp3.Call executeCall(ExecuteRequest6 executeRequest6, final ApiCallba } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest6 executeRequest6, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest6' is set - if (executeRequest6 == null) { - throw new ApiException("Missing the required parameter 'executeRequest6' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(CreatePayment createPayment, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createPayment' is set + if (createPayment == null) { + throw new ApiException("Missing the required parameter 'createPayment' when calling execute(Async)"); } - return executeCall(executeRequest6, _callback); + return executeCall(createPayment, _callback); } /** * Create a Payment * Create a Payment via API - * @param executeRequest6 Create Payment Request (required) + * @param createPayment Create Payment Request (required) * @return UnitPaymentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -153,15 +153,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest6 executeRequest6, 201 Successful Response - */ - public UnitPaymentResponse execute(ExecuteRequest6 executeRequest6) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest6); + public UnitPaymentResponse execute(CreatePayment createPayment) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(createPayment); return localVarResp.getData(); } /** * Create a Payment * Create a Payment via API - * @param executeRequest6 Create Payment Request (required) + * @param createPayment Create Payment Request (required) * @return ApiResponse<UnitPaymentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ public UnitPaymentResponse execute(ExecuteRequest6 executeRequest6) throws ApiEx 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest6 executeRequest6) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest6, null); + public ApiResponse executeWithHttpInfo(CreatePayment createPayment) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(createPayment, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -179,7 +179,7 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest6 exec /** * Create a Payment (asynchronously) * Create a Payment via API - * @param executeRequest6 Create Payment Request (required) + * @param createPayment Create Payment Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -189,9 +189,9 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest6 exec 201 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteRequest6 executeRequest6, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(CreatePayment createPayment, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest6, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(createPayment, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateARepaymentApi.java b/src/main/java/org/openapitools/client/api/CreateARepaymentApi.java index 9fb6bf8c..0c4648ed 100644 --- a/src/main/java/org/openapitools/client/api/CreateARepaymentApi.java +++ b/src/main/java/org/openapitools/client/api/CreateARepaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest18; +import org.openapitools.client.model.CreateRepayment; import org.openapitools.client.model.UnitRepaymentResponse; import java.lang.reflect.Type; @@ -75,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest18 Create a Repayment Request (required) + * @param createRepayment Create a Repayment Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 0 - */ - public okhttp3.Call executeCall(ExecuteRequest18 executeRequest18, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(CreateRepayment createRepayment, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(ExecuteRequest18 executeRequest18, final ApiCall basePath = null; } - Object localVarPostBody = executeRequest18; + Object localVarPostBody = createRepayment; // create path and map variables String localVarPath = "/repayments"; @@ -132,20 +132,20 @@ public okhttp3.Call executeCall(ExecuteRequest18 executeRequest18, final ApiCall } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest18 executeRequest18, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest18' is set - if (executeRequest18 == null) { - throw new ApiException("Missing the required parameter 'executeRequest18' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(CreateRepayment createRepayment, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createRepayment' is set + if (createRepayment == null) { + throw new ApiException("Missing the required parameter 'createRepayment' when calling execute(Async)"); } - return executeCall(executeRequest18, _callback); + return executeCall(createRepayment, _callback); } /** * Create a Repayment * Create a Repayment via API - * @param executeRequest18 Create a Repayment Request (required) + * @param createRepayment Create a Repayment Request (required) * @return UnitRepaymentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -155,15 +155,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest18 executeRequest18 0 - */ - public UnitRepaymentResponse execute(ExecuteRequest18 executeRequest18) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest18); + public UnitRepaymentResponse execute(CreateRepayment createRepayment) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(createRepayment); return localVarResp.getData(); } /** * Create a Repayment * Create a Repayment via API - * @param executeRequest18 Create a Repayment Request (required) + * @param createRepayment Create a Repayment Request (required) * @return ApiResponse<UnitRepaymentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -173,8 +173,8 @@ public UnitRepaymentResponse execute(ExecuteRequest18 executeRequest18) throws A 0 - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest18 executeRequest18) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest18, null); + public ApiResponse executeWithHttpInfo(CreateRepayment createRepayment) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(createRepayment, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -182,7 +182,7 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest18 e /** * Create a Repayment (asynchronously) * Create a Repayment via API - * @param executeRequest18 Create a Repayment Request (required) + * @param createRepayment Create a Repayment Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -193,9 +193,9 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest18 e 0 - */ - public okhttp3.Call executeAsync(ExecuteRequest18 executeRequest18, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(CreateRepayment createRepayment, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest18, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(createRepayment, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateAccountApi.java b/src/main/java/org/openapitools/client/api/CreateAccountApi.java index 485b1f81..246d5717 100644 --- a/src/main/java/org/openapitools/client/api/CreateAccountApi.java +++ b/src/main/java/org/openapitools/client/api/CreateAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/CreateApplicationApi.java b/src/main/java/org/openapitools/client/api/CreateApplicationApi.java index 51fc0af3..69a7fb2f 100644 --- a/src/main/java/org/openapitools/client/api/CreateApplicationApi.java +++ b/src/main/java/org/openapitools/client/api/CreateApplicationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/CreateApplicationFormApi.java b/src/main/java/org/openapitools/client/api/CreateApplicationFormApi.java index 52c084b5..db045904 100644 --- a/src/main/java/org/openapitools/client/api/CreateApplicationFormApi.java +++ b/src/main/java/org/openapitools/client/api/CreateApplicationFormApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest1; +import org.openapitools.client.model.CreateApplicationForm; import org.openapitools.client.model.UnitApplicationFormResponse; import java.lang.reflect.Type; @@ -75,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest1 Create Application Form Request (required) + * @param createApplicationForm Create Application Form Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,7 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(ExecuteRequest1 executeRequest1, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(CreateApplicationForm createApplicationForm, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -99,7 +99,7 @@ public okhttp3.Call executeCall(ExecuteRequest1 executeRequest1, final ApiCallba basePath = null; } - Object localVarPostBody = executeRequest1; + Object localVarPostBody = createApplicationForm; // create path and map variables String localVarPath = "/application-forms"; @@ -131,20 +131,20 @@ public okhttp3.Call executeCall(ExecuteRequest1 executeRequest1, final ApiCallba } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest1 executeRequest1, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest1' is set - if (executeRequest1 == null) { - throw new ApiException("Missing the required parameter 'executeRequest1' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(CreateApplicationForm createApplicationForm, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createApplicationForm' is set + if (createApplicationForm == null) { + throw new ApiException("Missing the required parameter 'createApplicationForm' when calling execute(Async)"); } - return executeCall(executeRequest1, _callback); + return executeCall(createApplicationForm, _callback); } /** * Create Application Form * Create an Application Form via API - * @param executeRequest1 Create Application Form Request (required) + * @param createApplicationForm Create Application Form Request (required) * @return UnitApplicationFormResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -153,15 +153,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest1 executeRequest1, 201 Successful Response - */ - public UnitApplicationFormResponse execute(ExecuteRequest1 executeRequest1) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest1); + public UnitApplicationFormResponse execute(CreateApplicationForm createApplicationForm) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(createApplicationForm); return localVarResp.getData(); } /** * Create Application Form * Create an Application Form via API - * @param executeRequest1 Create Application Form Request (required) + * @param createApplicationForm Create Application Form Request (required) * @return ApiResponse<UnitApplicationFormResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ public UnitApplicationFormResponse execute(ExecuteRequest1 executeRequest1) thro 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest1 executeRequest1) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest1, null); + public ApiResponse executeWithHttpInfo(CreateApplicationForm createApplicationForm) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(createApplicationForm, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -179,7 +179,7 @@ public ApiResponse executeWithHttpInfo(ExecuteReque /** * Create Application Form (asynchronously) * Create an Application Form via API - * @param executeRequest1 Create Application Form Request (required) + * @param createApplicationForm Create Application Form Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -189,9 +189,9 @@ public ApiResponse executeWithHttpInfo(ExecuteReque 201 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteRequest1 executeRequest1, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(CreateApplicationForm createApplicationForm, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest1, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(createApplicationForm, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateCheckDepositApi.java b/src/main/java/org/openapitools/client/api/CreateCheckDepositApi.java index c1da89ef..cef657fe 100644 --- a/src/main/java/org/openapitools/client/api/CreateCheckDepositApi.java +++ b/src/main/java/org/openapitools/client/api/CreateCheckDepositApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest14; +import org.openapitools.client.model.CreateCheckDeposit; import org.openapitools.client.model.UnitCheckDepositResponse; import java.lang.reflect.Type; @@ -75,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest14 Create Check Deposit Request (required) + * @param createCheckDeposit Create Check Deposit Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,7 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(ExecuteRequest14 executeRequest14, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(CreateCheckDeposit createCheckDeposit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -99,7 +99,7 @@ public okhttp3.Call executeCall(ExecuteRequest14 executeRequest14, final ApiCall basePath = null; } - Object localVarPostBody = executeRequest14; + Object localVarPostBody = createCheckDeposit; // create path and map variables String localVarPath = "/check-deposits"; @@ -131,20 +131,20 @@ public okhttp3.Call executeCall(ExecuteRequest14 executeRequest14, final ApiCall } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest14 executeRequest14, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest14' is set - if (executeRequest14 == null) { - throw new ApiException("Missing the required parameter 'executeRequest14' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(CreateCheckDeposit createCheckDeposit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createCheckDeposit' is set + if (createCheckDeposit == null) { + throw new ApiException("Missing the required parameter 'createCheckDeposit' when calling execute(Async)"); } - return executeCall(executeRequest14, _callback); + return executeCall(createCheckDeposit, _callback); } /** * Create Check Deposit * Create a Check Deposit via API - * @param executeRequest14 Create Check Deposit Request (required) + * @param createCheckDeposit Create Check Deposit Request (required) * @return UnitCheckDepositResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -153,15 +153,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest14 executeRequest14 201 Successful Response - */ - public UnitCheckDepositResponse execute(ExecuteRequest14 executeRequest14) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest14); + public UnitCheckDepositResponse execute(CreateCheckDeposit createCheckDeposit) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(createCheckDeposit); return localVarResp.getData(); } /** * Create Check Deposit * Create a Check Deposit via API - * @param executeRequest14 Create Check Deposit Request (required) + * @param createCheckDeposit Create Check Deposit Request (required) * @return ApiResponse<UnitCheckDepositResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ public UnitCheckDepositResponse execute(ExecuteRequest14 executeRequest14) throw 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest14 executeRequest14) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest14, null); + public ApiResponse executeWithHttpInfo(CreateCheckDeposit createCheckDeposit) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(createCheckDeposit, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -179,7 +179,7 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest1 /** * Create Check Deposit (asynchronously) * Create a Check Deposit via API - * @param executeRequest14 Create Check Deposit Request (required) + * @param createCheckDeposit Create Check Deposit Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -189,9 +189,9 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest1 201 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteRequest14 executeRequest14, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(CreateCheckDeposit createCheckDeposit, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest14, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(createCheckDeposit, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/CreateCheckPaymentApi.java index 5c79b1d7..429f31f1 100644 --- a/src/main/java/org/openapitools/client/api/CreateCheckPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/CreateCheckPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest19; +import org.openapitools.client.model.CreateCheckPayment; import org.openapitools.client.model.UnitCheckPaymentResponse; import java.lang.reflect.Type; @@ -75,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest19 Create Check Payment Request (required) + * @param createCheckPayment Create Check Payment Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,7 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(ExecuteRequest19 executeRequest19, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(CreateCheckPayment createCheckPayment, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -99,7 +99,7 @@ public okhttp3.Call executeCall(ExecuteRequest19 executeRequest19, final ApiCall basePath = null; } - Object localVarPostBody = executeRequest19; + Object localVarPostBody = createCheckPayment; // create path and map variables String localVarPath = "/check-payments"; @@ -131,20 +131,20 @@ public okhttp3.Call executeCall(ExecuteRequest19 executeRequest19, final ApiCall } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest19 executeRequest19, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest19' is set - if (executeRequest19 == null) { - throw new ApiException("Missing the required parameter 'executeRequest19' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(CreateCheckPayment createCheckPayment, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createCheckPayment' is set + if (createCheckPayment == null) { + throw new ApiException("Missing the required parameter 'createCheckPayment' when calling execute(Async)"); } - return executeCall(executeRequest19, _callback); + return executeCall(createCheckPayment, _callback); } /** * Create Check Payment * Create Check Payment via API - * @param executeRequest19 Create Check Payment Request (required) + * @param createCheckPayment Create Check Payment Request (required) * @return UnitCheckPaymentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -153,15 +153,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest19 executeRequest19 201 Successful Response - */ - public UnitCheckPaymentResponse execute(ExecuteRequest19 executeRequest19) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest19); + public UnitCheckPaymentResponse execute(CreateCheckPayment createCheckPayment) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(createCheckPayment); return localVarResp.getData(); } /** * Create Check Payment * Create Check Payment via API - * @param executeRequest19 Create Check Payment Request (required) + * @param createCheckPayment Create Check Payment Request (required) * @return ApiResponse<UnitCheckPaymentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ public UnitCheckPaymentResponse execute(ExecuteRequest19 executeRequest19) throw 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest19 executeRequest19) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest19, null); + public ApiResponse executeWithHttpInfo(CreateCheckPayment createCheckPayment) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(createCheckPayment, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -179,7 +179,7 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest1 /** * Create Check Payment (asynchronously) * Create Check Payment via API - * @param executeRequest19 Create Check Payment Request (required) + * @param createCheckPayment Create Check Payment Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -189,9 +189,9 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest1 201 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteRequest19 executeRequest19, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(CreateCheckPayment createCheckPayment, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest19, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(createCheckPayment, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateCounterpartyApi.java b/src/main/java/org/openapitools/client/api/CreateCounterpartyApi.java index 68ff20ed..334412d2 100644 --- a/src/main/java/org/openapitools/client/api/CreateCounterpartyApi.java +++ b/src/main/java/org/openapitools/client/api/CreateCounterpartyApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest7; +import org.openapitools.client.model.CreateCounterparty; import org.openapitools.client.model.UnitCounterpartyResponse; import java.lang.reflect.Type; @@ -75,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest7 Create Counterparty Request (required) + * @param createCounterparty Create Counterparty Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,7 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(ExecuteRequest7 executeRequest7, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(CreateCounterparty createCounterparty, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -99,7 +99,7 @@ public okhttp3.Call executeCall(ExecuteRequest7 executeRequest7, final ApiCallba basePath = null; } - Object localVarPostBody = executeRequest7; + Object localVarPostBody = createCounterparty; // create path and map variables String localVarPath = "/counterparties"; @@ -131,20 +131,20 @@ public okhttp3.Call executeCall(ExecuteRequest7 executeRequest7, final ApiCallba } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest7 executeRequest7, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest7' is set - if (executeRequest7 == null) { - throw new ApiException("Missing the required parameter 'executeRequest7' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(CreateCounterparty createCounterparty, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createCounterparty' is set + if (createCounterparty == null) { + throw new ApiException("Missing the required parameter 'createCounterparty' when calling execute(Async)"); } - return executeCall(executeRequest7, _callback); + return executeCall(createCounterparty, _callback); } /** * Create Counterparty * Create a counterparty via API - * @param executeRequest7 Create Counterparty Request (required) + * @param createCounterparty Create Counterparty Request (required) * @return UnitCounterpartyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -153,15 +153,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest7 executeRequest7, 201 Successful Response - */ - public UnitCounterpartyResponse execute(ExecuteRequest7 executeRequest7) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest7); + public UnitCounterpartyResponse execute(CreateCounterparty createCounterparty) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(createCounterparty); return localVarResp.getData(); } /** * Create Counterparty * Create a counterparty via API - * @param executeRequest7 Create Counterparty Request (required) + * @param createCounterparty Create Counterparty Request (required) * @return ApiResponse<UnitCounterpartyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ public UnitCounterpartyResponse execute(ExecuteRequest7 executeRequest7) throws 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest7 executeRequest7) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest7, null); + public ApiResponse executeWithHttpInfo(CreateCounterparty createCounterparty) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(createCounterparty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -179,7 +179,7 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest7 /** * Create Counterparty (asynchronously) * Create a counterparty via API - * @param executeRequest7 Create Counterparty Request (required) + * @param createCounterparty Create Counterparty Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -189,9 +189,9 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest7 201 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteRequest7 executeRequest7, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(CreateCounterparty createCounterparty, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest7, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(createCounterparty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateCustomerTokenApi.java b/src/main/java/org/openapitools/client/api/CreateCustomerTokenApi.java index 81a5d3bf..3e8875a8 100644 --- a/src/main/java/org/openapitools/client/api/CreateCustomerTokenApi.java +++ b/src/main/java/org/openapitools/client/api/CreateCustomerTokenApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest16; +import org.openapitools.client.model.CreateCustomerToken; import org.openapitools.client.model.UnitCustomerTokenResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param customerId ID of the customer to create token for (required) - * @param executeRequest16 Create Customer Token Request (required) + * @param createCustomerToken Create Customer Token Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(String customerId, ExecuteRequest16 executeRequest16, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String customerId, CreateCustomerToken createCustomerToken, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(String customerId, ExecuteRequest16 executeReque basePath = null; } - Object localVarPostBody = executeRequest16; + Object localVarPostBody = createCustomerToken; // create path and map variables String localVarPath = "/customers/{customerId}/token" @@ -133,18 +133,18 @@ public okhttp3.Call executeCall(String customerId, ExecuteRequest16 executeReque } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String customerId, ExecuteRequest16 executeRequest16, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String customerId, CreateCustomerToken createCustomerToken, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customerId' is set if (customerId == null) { throw new ApiException("Missing the required parameter 'customerId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest16' is set - if (executeRequest16 == null) { - throw new ApiException("Missing the required parameter 'executeRequest16' when calling execute(Async)"); + // verify the required parameter 'createCustomerToken' is set + if (createCustomerToken == null) { + throw new ApiException("Missing the required parameter 'createCustomerToken' when calling execute(Async)"); } - return executeCall(customerId, executeRequest16, _callback); + return executeCall(customerId, createCustomerToken, _callback); } @@ -152,7 +152,7 @@ private okhttp3.Call executeValidateBeforeCall(String customerId, ExecuteRequest * Create Customer Token * Create a Customer Token via API * @param customerId ID of the customer to create token for (required) - * @param executeRequest16 Create Customer Token Request (required) + * @param createCustomerToken Create Customer Token Request (required) * @return UnitCustomerTokenResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -161,8 +161,8 @@ private okhttp3.Call executeValidateBeforeCall(String customerId, ExecuteRequest 201 Successful Response - */ - public UnitCustomerTokenResponse execute(String customerId, ExecuteRequest16 executeRequest16) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(customerId, executeRequest16); + public UnitCustomerTokenResponse execute(String customerId, CreateCustomerToken createCustomerToken) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(customerId, createCustomerToken); return localVarResp.getData(); } @@ -170,7 +170,7 @@ public UnitCustomerTokenResponse execute(String customerId, ExecuteRequest16 exe * Create Customer Token * Create a Customer Token via API * @param customerId ID of the customer to create token for (required) - * @param executeRequest16 Create Customer Token Request (required) + * @param createCustomerToken Create Customer Token Request (required) * @return ApiResponse<UnitCustomerTokenResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +179,8 @@ public UnitCustomerTokenResponse execute(String customerId, ExecuteRequest16 exe 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(String customerId, ExecuteRequest16 executeRequest16) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, executeRequest16, null); + public ApiResponse executeWithHttpInfo(String customerId, CreateCustomerToken createCustomerToken) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, createCustomerToken, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,7 +189,7 @@ public ApiResponse executeWithHttpInfo(String custome * Create Customer Token (asynchronously) * Create a Customer Token via API * @param customerId ID of the customer to create token for (required) - * @param executeRequest16 Create Customer Token Request (required) + * @param createCustomerToken Create Customer Token Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -199,9 +199,9 @@ public ApiResponse executeWithHttpInfo(String custome 201 Successful Response - */ - public okhttp3.Call executeAsync(String customerId, ExecuteRequest16 executeRequest16, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String customerId, CreateCustomerToken createCustomerToken, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, executeRequest16, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, createCustomerToken, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateCustomerTokenVerificationApi.java b/src/main/java/org/openapitools/client/api/CreateCustomerTokenVerificationApi.java index 26be02fc..d3dfb519 100644 --- a/src/main/java/org/openapitools/client/api/CreateCustomerTokenVerificationApi.java +++ b/src/main/java/org/openapitools/client/api/CreateCustomerTokenVerificationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest17; +import org.openapitools.client.model.CreateCustomerTokenVerification; import org.openapitools.client.model.UnitCustomerTokenVerificationResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param customerId ID of the customer to create token for (required) - * @param executeRequest17 Create Customer Token Verification Request (required) + * @param createCustomerTokenVerification Create Customer Token Verification Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(String customerId, ExecuteRequest17 executeRequest17, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(String customerId, ExecuteRequest17 executeReque basePath = null; } - Object localVarPostBody = executeRequest17; + Object localVarPostBody = createCustomerTokenVerification; // create path and map variables String localVarPath = "/customers/{customerId}/token/verification" @@ -133,18 +133,18 @@ public okhttp3.Call executeCall(String customerId, ExecuteRequest17 executeReque } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String customerId, ExecuteRequest17 executeRequest17, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customerId' is set if (customerId == null) { throw new ApiException("Missing the required parameter 'customerId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest17' is set - if (executeRequest17 == null) { - throw new ApiException("Missing the required parameter 'executeRequest17' when calling execute(Async)"); + // verify the required parameter 'createCustomerTokenVerification' is set + if (createCustomerTokenVerification == null) { + throw new ApiException("Missing the required parameter 'createCustomerTokenVerification' when calling execute(Async)"); } - return executeCall(customerId, executeRequest17, _callback); + return executeCall(customerId, createCustomerTokenVerification, _callback); } @@ -152,7 +152,7 @@ private okhttp3.Call executeValidateBeforeCall(String customerId, ExecuteRequest * Create Customer Token Verification * Create a Customer Token Verification via API * @param customerId ID of the customer to create token for (required) - * @param executeRequest17 Create Customer Token Verification Request (required) + * @param createCustomerTokenVerification Create Customer Token Verification Request (required) * @return UnitCustomerTokenVerificationResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -161,8 +161,8 @@ private okhttp3.Call executeValidateBeforeCall(String customerId, ExecuteRequest 201 Successful Response - */ - public UnitCustomerTokenVerificationResponse execute(String customerId, ExecuteRequest17 executeRequest17) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(customerId, executeRequest17); + public UnitCustomerTokenVerificationResponse execute(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(customerId, createCustomerTokenVerification); return localVarResp.getData(); } @@ -170,7 +170,7 @@ public UnitCustomerTokenVerificationResponse execute(String customerId, ExecuteR * Create Customer Token Verification * Create a Customer Token Verification via API * @param customerId ID of the customer to create token for (required) - * @param executeRequest17 Create Customer Token Verification Request (required) + * @param createCustomerTokenVerification Create Customer Token Verification Request (required) * @return ApiResponse<UnitCustomerTokenVerificationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +179,8 @@ public UnitCustomerTokenVerificationResponse execute(String customerId, ExecuteR 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(String customerId, ExecuteRequest17 executeRequest17) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, executeRequest17, null); + public ApiResponse executeWithHttpInfo(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, createCustomerTokenVerification, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,7 +189,7 @@ public ApiResponse executeWithHttpInfo(St * Create Customer Token Verification (asynchronously) * Create a Customer Token Verification via API * @param customerId ID of the customer to create token for (required) - * @param executeRequest17 Create Customer Token Verification Request (required) + * @param createCustomerTokenVerification Create Customer Token Verification Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -199,9 +199,9 @@ public ApiResponse executeWithHttpInfo(St 201 Successful Response - */ - public okhttp3.Call executeAsync(String customerId, ExecuteRequest17 executeRequest17, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, executeRequest17, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, createCustomerTokenVerification, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateFeeApi.java b/src/main/java/org/openapitools/client/api/CreateFeeApi.java index ce82bff9..8e0553c2 100644 --- a/src/main/java/org/openapitools/client/api/CreateFeeApi.java +++ b/src/main/java/org/openapitools/client/api/CreateFeeApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,6 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest13; import org.openapitools.client.model.UnitFeeResponse; import java.lang.reflect.Type; @@ -75,7 +74,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest13 Create Fee Request (required) + * @param body Create Fee Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,7 +84,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(ExecuteRequest13 executeRequest13, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(Object body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -99,7 +98,7 @@ public okhttp3.Call executeCall(ExecuteRequest13 executeRequest13, final ApiCall basePath = null; } - Object localVarPostBody = executeRequest13; + Object localVarPostBody = body; // create path and map variables String localVarPath = "/fees"; @@ -131,20 +130,20 @@ public okhttp3.Call executeCall(ExecuteRequest13 executeRequest13, final ApiCall } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest13 executeRequest13, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest13' is set - if (executeRequest13 == null) { - throw new ApiException("Missing the required parameter 'executeRequest13' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(Object body, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling execute(Async)"); } - return executeCall(executeRequest13, _callback); + return executeCall(body, _callback); } /** * Create Fee * Create a Fee via API - * @param executeRequest13 Create Fee Request (required) + * @param body Create Fee Request (required) * @return UnitFeeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -153,15 +152,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest13 executeRequest13 201 Successful Response - */ - public UnitFeeResponse execute(ExecuteRequest13 executeRequest13) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest13); + public UnitFeeResponse execute(Object body) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(body); return localVarResp.getData(); } /** * Create Fee * Create a Fee via API - * @param executeRequest13 Create Fee Request (required) + * @param body Create Fee Request (required) * @return ApiResponse<UnitFeeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +169,8 @@ public UnitFeeResponse execute(ExecuteRequest13 executeRequest13) throws ApiExce 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest13 executeRequest13) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest13, null); + public ApiResponse executeWithHttpInfo(Object body) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -179,7 +178,7 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest13 execute /** * Create Fee (asynchronously) * Create a Fee via API - * @param executeRequest13 Create Fee Request (required) + * @param body Create Fee Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -189,9 +188,9 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest13 execute 201 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteRequest13 executeRequest13, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(Object body, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest13, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateOrgApiTokenApi.java b/src/main/java/org/openapitools/client/api/CreateOrgApiTokenApi.java index 9ab78ab1..b1bd7873 100644 --- a/src/main/java/org/openapitools/client/api/CreateOrgApiTokenApi.java +++ b/src/main/java/org/openapitools/client/api/CreateOrgApiTokenApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest15; +import org.openapitools.client.model.CreateApiToken; import org.openapitools.client.model.UnitApiTokenResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param userId ID of the user to create token for (required) - * @param executeRequest15 Create Org API Token Request (required) + * @param createApiToken Create Org API Token Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(String userId, ExecuteRequest15 executeRequest15, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String userId, CreateApiToken createApiToken, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(String userId, ExecuteRequest15 executeRequest15 basePath = null; } - Object localVarPostBody = executeRequest15; + Object localVarPostBody = createApiToken; // create path and map variables String localVarPath = "/users/{userId}/api-tokens" @@ -133,18 +133,18 @@ public okhttp3.Call executeCall(String userId, ExecuteRequest15 executeRequest15 } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String userId, ExecuteRequest15 executeRequest15, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String userId, CreateApiToken createApiToken, final ApiCallback _callback) throws ApiException { // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest15' is set - if (executeRequest15 == null) { - throw new ApiException("Missing the required parameter 'executeRequest15' when calling execute(Async)"); + // verify the required parameter 'createApiToken' is set + if (createApiToken == null) { + throw new ApiException("Missing the required parameter 'createApiToken' when calling execute(Async)"); } - return executeCall(userId, executeRequest15, _callback); + return executeCall(userId, createApiToken, _callback); } @@ -152,7 +152,7 @@ private okhttp3.Call executeValidateBeforeCall(String userId, ExecuteRequest15 e * Create Org API Token * Create an Org API Token via API * @param userId ID of the user to create token for (required) - * @param executeRequest15 Create Org API Token Request (required) + * @param createApiToken Create Org API Token Request (required) * @return UnitApiTokenResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -161,8 +161,8 @@ private okhttp3.Call executeValidateBeforeCall(String userId, ExecuteRequest15 e 201 Successful Response - */ - public UnitApiTokenResponse execute(String userId, ExecuteRequest15 executeRequest15) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(userId, executeRequest15); + public UnitApiTokenResponse execute(String userId, CreateApiToken createApiToken) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(userId, createApiToken); return localVarResp.getData(); } @@ -170,7 +170,7 @@ public UnitApiTokenResponse execute(String userId, ExecuteRequest15 executeReque * Create Org API Token * Create an Org API Token via API * @param userId ID of the user to create token for (required) - * @param executeRequest15 Create Org API Token Request (required) + * @param createApiToken Create Org API Token Request (required) * @return ApiResponse<UnitApiTokenResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +179,8 @@ public UnitApiTokenResponse execute(String userId, ExecuteRequest15 executeReque 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(String userId, ExecuteRequest15 executeRequest15) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(userId, executeRequest15, null); + public ApiResponse executeWithHttpInfo(String userId, CreateApiToken createApiToken) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(userId, createApiToken, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,7 +189,7 @@ public ApiResponse executeWithHttpInfo(String userId, Exec * Create Org API Token (asynchronously) * Create an Org API Token via API * @param userId ID of the user to create token for (required) - * @param executeRequest15 Create Org API Token Request (required) + * @param createApiToken Create Org API Token Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -199,9 +199,9 @@ public ApiResponse executeWithHttpInfo(String userId, Exec 201 Successful Response - */ - public okhttp3.Call executeAsync(String userId, ExecuteRequest15 executeRequest15, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String userId, CreateApiToken createApiToken, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(userId, executeRequest15, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(userId, createApiToken, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateRecurringPaymentApi.java b/src/main/java/org/openapitools/client/api/CreateRecurringPaymentApi.java index e2670e00..b8d34da4 100644 --- a/src/main/java/org/openapitools/client/api/CreateRecurringPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/CreateRecurringPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest8; +import org.openapitools.client.model.CreateRecurringPayment; import org.openapitools.client.model.UnitRecurringPaymentResponse; import java.lang.reflect.Type; @@ -75,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest8 Create Recurring Payment Request (required) + * @param createRecurringPayment Create Recurring Payment Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,7 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(ExecuteRequest8 executeRequest8, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(CreateRecurringPayment createRecurringPayment, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -99,7 +99,7 @@ public okhttp3.Call executeCall(ExecuteRequest8 executeRequest8, final ApiCallba basePath = null; } - Object localVarPostBody = executeRequest8; + Object localVarPostBody = createRecurringPayment; // create path and map variables String localVarPath = "/recurring-payments"; @@ -131,20 +131,20 @@ public okhttp3.Call executeCall(ExecuteRequest8 executeRequest8, final ApiCallba } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest8 executeRequest8, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest8' is set - if (executeRequest8 == null) { - throw new ApiException("Missing the required parameter 'executeRequest8' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(CreateRecurringPayment createRecurringPayment, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createRecurringPayment' is set + if (createRecurringPayment == null) { + throw new ApiException("Missing the required parameter 'createRecurringPayment' when calling execute(Async)"); } - return executeCall(executeRequest8, _callback); + return executeCall(createRecurringPayment, _callback); } /** * Create Recurring Payment * Create a Recurring Payment via API - * @param executeRequest8 Create Recurring Payment Request (required) + * @param createRecurringPayment Create Recurring Payment Request (required) * @return UnitRecurringPaymentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -153,15 +153,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest8 executeRequest8, 201 Successful Response - */ - public UnitRecurringPaymentResponse execute(ExecuteRequest8 executeRequest8) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest8); + public UnitRecurringPaymentResponse execute(CreateRecurringPayment createRecurringPayment) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(createRecurringPayment); return localVarResp.getData(); } /** * Create Recurring Payment * Create a Recurring Payment via API - * @param executeRequest8 Create Recurring Payment Request (required) + * @param createRecurringPayment Create Recurring Payment Request (required) * @return ApiResponse<UnitRecurringPaymentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ public UnitRecurringPaymentResponse execute(ExecuteRequest8 executeRequest8) thr 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest8 executeRequest8) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest8, null); + public ApiResponse executeWithHttpInfo(CreateRecurringPayment createRecurringPayment) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(createRecurringPayment, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -179,7 +179,7 @@ public ApiResponse executeWithHttpInfo(ExecuteRequ /** * Create Recurring Payment (asynchronously) * Create a Recurring Payment via API - * @param executeRequest8 Create Recurring Payment Request (required) + * @param createRecurringPayment Create Recurring Payment Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -189,9 +189,9 @@ public ApiResponse executeWithHttpInfo(ExecuteRequ 201 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteRequest8 executeRequest8, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(CreateRecurringPayment createRecurringPayment, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest8, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(createRecurringPayment, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateRewardApi.java b/src/main/java/org/openapitools/client/api/CreateRewardApi.java index 706a3d71..b2699e03 100644 --- a/src/main/java/org/openapitools/client/api/CreateRewardApi.java +++ b/src/main/java/org/openapitools/client/api/CreateRewardApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest12; +import org.openapitools.client.model.CreateReward; import org.openapitools.client.model.UnitRewardResponse; import java.lang.reflect.Type; @@ -75,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute - * @param executeRequest12 Create Reward Request (required) + * @param createReward Create Reward Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,7 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 Successful Response - */ - public okhttp3.Call executeCall(ExecuteRequest12 executeRequest12, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(CreateReward createReward, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -99,7 +99,7 @@ public okhttp3.Call executeCall(ExecuteRequest12 executeRequest12, final ApiCall basePath = null; } - Object localVarPostBody = executeRequest12; + Object localVarPostBody = createReward; // create path and map variables String localVarPath = "/rewards"; @@ -131,20 +131,20 @@ public okhttp3.Call executeCall(ExecuteRequest12 executeRequest12, final ApiCall } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteRequest12 executeRequest12, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'executeRequest12' is set - if (executeRequest12 == null) { - throw new ApiException("Missing the required parameter 'executeRequest12' when calling execute(Async)"); + private okhttp3.Call executeValidateBeforeCall(CreateReward createReward, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createReward' is set + if (createReward == null) { + throw new ApiException("Missing the required parameter 'createReward' when calling execute(Async)"); } - return executeCall(executeRequest12, _callback); + return executeCall(createReward, _callback); } /** * Create Reward * Create a Reward via API - * @param executeRequest12 Create Reward Request (required) + * @param createReward Create Reward Request (required) * @return UnitRewardResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -153,15 +153,15 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteRequest12 executeRequest12 201 Successful Response - */ - public UnitRewardResponse execute(ExecuteRequest12 executeRequest12) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(executeRequest12); + public UnitRewardResponse execute(CreateReward createReward) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(createReward); return localVarResp.getData(); } /** * Create Reward * Create a Reward via API - * @param executeRequest12 Create Reward Request (required) + * @param createReward Create Reward Request (required) * @return ApiResponse<UnitRewardResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ public UnitRewardResponse execute(ExecuteRequest12 executeRequest12) throws ApiE 201 Successful Response - */ - public ApiResponse executeWithHttpInfo(ExecuteRequest12 executeRequest12) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest12, null); + public ApiResponse executeWithHttpInfo(CreateReward createReward) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(createReward, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -179,7 +179,7 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest12 exec /** * Create Reward (asynchronously) * Create a Reward via API - * @param executeRequest12 Create Reward Request (required) + * @param createReward Create Reward Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -189,9 +189,9 @@ public ApiResponse executeWithHttpInfo(ExecuteRequest12 exec 201 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteRequest12 executeRequest12, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(CreateReward createReward, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(executeRequest12, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(createReward, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/CreateWebhookApi.java b/src/main/java/org/openapitools/client/api/CreateWebhookApi.java index f7cc3672..9d58ae7e 100644 --- a/src/main/java/org/openapitools/client/api/CreateWebhookApi.java +++ b/src/main/java/org/openapitools/client/api/CreateWebhookApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/DeactivateControlAgreementForAccountApi.java b/src/main/java/org/openapitools/client/api/DeactivateControlAgreementForAccountApi.java index 11b94e20..26bbe248 100644 --- a/src/main/java/org/openapitools/client/api/DeactivateControlAgreementForAccountApi.java +++ b/src/main/java/org/openapitools/client/api/DeactivateControlAgreementForAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/DeclineAuthorizationRequestApi.java b/src/main/java/org/openapitools/client/api/DeclineAuthorizationRequestApi.java index 8b819e67..1dc62ce3 100644 --- a/src/main/java/org/openapitools/client/api/DeclineAuthorizationRequestApi.java +++ b/src/main/java/org/openapitools/client/api/DeclineAuthorizationRequestApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest11; +import org.openapitools.client.model.DeclineAuthorizationRequest; import org.openapitools.client.model.UnitAuthorizationRequestResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param authorizationId ID of the authorization request to decline (required) - * @param executeRequest11 Decline Authorization Request Request (required) + * @param declineAuthorizationRequest Decline Authorization Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 200 Successful Response - */ - public okhttp3.Call executeCall(String authorizationId, ExecuteRequest11 executeRequest11, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(String authorizationId, ExecuteRequest11 execute basePath = null; } - Object localVarPostBody = executeRequest11; + Object localVarPostBody = declineAuthorizationRequest; // create path and map variables String localVarPath = "/authorization-requests/{authorizationId}/decline" @@ -133,18 +133,18 @@ public okhttp3.Call executeCall(String authorizationId, ExecuteRequest11 execute } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String authorizationId, ExecuteRequest11 executeRequest11, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'authorizationId' is set if (authorizationId == null) { throw new ApiException("Missing the required parameter 'authorizationId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest11' is set - if (executeRequest11 == null) { - throw new ApiException("Missing the required parameter 'executeRequest11' when calling execute(Async)"); + // verify the required parameter 'declineAuthorizationRequest' is set + if (declineAuthorizationRequest == null) { + throw new ApiException("Missing the required parameter 'declineAuthorizationRequest' when calling execute(Async)"); } - return executeCall(authorizationId, executeRequest11, _callback); + return executeCall(authorizationId, declineAuthorizationRequest, _callback); } @@ -152,7 +152,7 @@ private okhttp3.Call executeValidateBeforeCall(String authorizationId, ExecuteRe * Decline Authorization Request * Decline Authorization Request via API * @param authorizationId ID of the authorization request to decline (required) - * @param executeRequest11 Decline Authorization Request Request (required) + * @param declineAuthorizationRequest Decline Authorization Request (required) * @return UnitAuthorizationRequestResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -161,8 +161,8 @@ private okhttp3.Call executeValidateBeforeCall(String authorizationId, ExecuteRe 200 Successful Response - */ - public UnitAuthorizationRequestResponse execute(String authorizationId, ExecuteRequest11 executeRequest11) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(authorizationId, executeRequest11); + public UnitAuthorizationRequestResponse execute(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(authorizationId, declineAuthorizationRequest); return localVarResp.getData(); } @@ -170,7 +170,7 @@ public UnitAuthorizationRequestResponse execute(String authorizationId, ExecuteR * Decline Authorization Request * Decline Authorization Request via API * @param authorizationId ID of the authorization request to decline (required) - * @param executeRequest11 Decline Authorization Request Request (required) + * @param declineAuthorizationRequest Decline Authorization Request (required) * @return ApiResponse<UnitAuthorizationRequestResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +179,8 @@ public UnitAuthorizationRequestResponse execute(String authorizationId, ExecuteR 200 Successful Response - */ - public ApiResponse executeWithHttpInfo(String authorizationId, ExecuteRequest11 executeRequest11) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, executeRequest11, null); + public ApiResponse executeWithHttpInfo(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, declineAuthorizationRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,7 +189,7 @@ public ApiResponse executeWithHttpInfo(String * Decline Authorization Request (asynchronously) * Decline Authorization Request via API * @param authorizationId ID of the authorization request to decline (required) - * @param executeRequest11 Decline Authorization Request Request (required) + * @param declineAuthorizationRequest Decline Authorization Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -199,9 +199,9 @@ public ApiResponse executeWithHttpInfo(String 200 Successful Response - */ - public okhttp3.Call executeAsync(String authorizationId, ExecuteRequest11 executeRequest11, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, executeRequest11, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, declineAuthorizationRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/DefaultApi.java b/src/main/java/org/openapitools/client/api/DefaultApi.java index 545fc3fa..70aa3231 100644 --- a/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -282,7 +282,7 @@ private okhttp3.Call execute_0ValidateBeforeCall(CreateStopPayment createStopPay } /** - * Create a new stop payment + * Create Stop Payment * * @param createStopPayment (required) * @return StopPaymentResponse @@ -299,7 +299,7 @@ public StopPaymentResponse execute_0(CreateStopPayment createStopPayment) throws } /** - * Create a new stop payment + * Create Stop Payment * * @param createStopPayment (required) * @return ApiResponse<StopPaymentResponse> @@ -317,7 +317,7 @@ public ApiResponse execute_0WithHttpInfo(CreateStopPayment } /** - * Create a new stop payment (asynchronously) + * Create Stop Payment (asynchronously) * * @param createStopPayment (required) * @param _callback The callback to be executed when the API call finishes diff --git a/src/main/java/org/openapitools/client/api/DeleteCounterpartyApi.java b/src/main/java/org/openapitools/client/api/DeleteCounterpartyApi.java index d1bcb5b8..50032232 100644 --- a/src/main/java/org/openapitools/client/api/DeleteCounterpartyApi.java +++ b/src/main/java/org/openapitools/client/api/DeleteCounterpartyApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/DisableRecurringPaymentApi.java b/src/main/java/org/openapitools/client/api/DisableRecurringPaymentApi.java index a3b9378e..982306fa 100644 --- a/src/main/java/org/openapitools/client/api/DisableRecurringPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/DisableRecurringPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/DisableWebhookApi.java b/src/main/java/org/openapitools/client/api/DisableWebhookApi.java index f69be876..a5604256 100644 --- a/src/main/java/org/openapitools/client/api/DisableWebhookApi.java +++ b/src/main/java/org/openapitools/client/api/DisableWebhookApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/DownloadADocumentApi.java b/src/main/java/org/openapitools/client/api/DownloadADocumentApi.java index 44013bab..621064e1 100644 --- a/src/main/java/org/openapitools/client/api/DownloadADocumentApi.java +++ b/src/main/java/org/openapitools/client/api/DownloadADocumentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/DownloadADocumentBackSideApi.java b/src/main/java/org/openapitools/client/api/DownloadADocumentBackSideApi.java index 40aead3e..d5f54376 100644 --- a/src/main/java/org/openapitools/client/api/DownloadADocumentBackSideApi.java +++ b/src/main/java/org/openapitools/client/api/DownloadADocumentBackSideApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/EnableRecurringPaymentApi.java b/src/main/java/org/openapitools/client/api/EnableRecurringPaymentApi.java index 06662310..3cccd3c3 100644 --- a/src/main/java/org/openapitools/client/api/EnableRecurringPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/EnableRecurringPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/EnableWebhookApi.java b/src/main/java/org/openapitools/client/api/EnableWebhookApi.java index 837dcde6..d99a40ba 100644 --- a/src/main/java/org/openapitools/client/api/EnableWebhookApi.java +++ b/src/main/java/org/openapitools/client/api/EnableWebhookApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/EnterControlAgreementForAccountApi.java b/src/main/java/org/openapitools/client/api/EnterControlAgreementForAccountApi.java index a20f449c..27c14a9a 100644 --- a/src/main/java/org/openapitools/client/api/EnterControlAgreementForAccountApi.java +++ b/src/main/java/org/openapitools/client/api/EnterControlAgreementForAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/FireEventApi.java b/src/main/java/org/openapitools/client/api/FireEventApi.java index 4a4aacfb..e3daa4ff 100644 --- a/src/main/java/org/openapitools/client/api/FireEventApi.java +++ b/src/main/java/org/openapitools/client/api/FireEventApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/FreezeACardApi.java b/src/main/java/org/openapitools/client/api/FreezeACardApi.java index 77e9968c..98090dd8 100644 --- a/src/main/java/org/openapitools/client/api/FreezeACardApi.java +++ b/src/main/java/org/openapitools/client/api/FreezeACardApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/FreezeAnAccountApi.java b/src/main/java/org/openapitools/client/api/FreezeAnAccountApi.java index 2efdeaf2..c40c34fb 100644 --- a/src/main/java/org/openapitools/client/api/FreezeAnAccountApi.java +++ b/src/main/java/org/openapitools/client/api/FreezeAnAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest3; +import org.openapitools.client.model.FreezeAccountRequest; import org.openapitools.client.model.UnitAccountResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param accountId ID of the account to freeze (required) - * @param executeRequest3 Freeze Account Request (required) + * @param freezeAccountRequest Freeze Account Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -87,7 +87,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 0 - */ - public okhttp3.Call executeCall(String accountId, ExecuteRequest3 executeRequest3, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String accountId, FreezeAccountRequest freezeAccountRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -101,7 +101,7 @@ public okhttp3.Call executeCall(String accountId, ExecuteRequest3 executeRequest basePath = null; } - Object localVarPostBody = executeRequest3; + Object localVarPostBody = freezeAccountRequest; // create path and map variables String localVarPath = "/accounts/{accountId}/freeze" @@ -134,18 +134,18 @@ public okhttp3.Call executeCall(String accountId, ExecuteRequest3 executeRequest } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, ExecuteRequest3 executeRequest3, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String accountId, FreezeAccountRequest freezeAccountRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest3' is set - if (executeRequest3 == null) { - throw new ApiException("Missing the required parameter 'executeRequest3' when calling execute(Async)"); + // verify the required parameter 'freezeAccountRequest' is set + if (freezeAccountRequest == null) { + throw new ApiException("Missing the required parameter 'freezeAccountRequest' when calling execute(Async)"); } - return executeCall(accountId, executeRequest3, _callback); + return executeCall(accountId, freezeAccountRequest, _callback); } @@ -153,7 +153,7 @@ private okhttp3.Call executeValidateBeforeCall(String accountId, ExecuteRequest3 * Freeze Account by Id * Freeze Account via API * @param accountId ID of the account to freeze (required) - * @param executeRequest3 Freeze Account Request (required) + * @param freezeAccountRequest Freeze Account Request (required) * @return UnitAccountResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -163,8 +163,8 @@ private okhttp3.Call executeValidateBeforeCall(String accountId, ExecuteRequest3 0 - */ - public UnitAccountResponse execute(String accountId, ExecuteRequest3 executeRequest3) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId, executeRequest3); + public UnitAccountResponse execute(String accountId, FreezeAccountRequest freezeAccountRequest) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(accountId, freezeAccountRequest); return localVarResp.getData(); } @@ -172,7 +172,7 @@ public UnitAccountResponse execute(String accountId, ExecuteRequest3 executeRequ * Freeze Account by Id * Freeze Account via API * @param accountId ID of the account to freeze (required) - * @param executeRequest3 Freeze Account Request (required) + * @param freezeAccountRequest Freeze Account Request (required) * @return ApiResponse<UnitAccountResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -182,8 +182,8 @@ public UnitAccountResponse execute(String accountId, ExecuteRequest3 executeRequ 0 - */ - public ApiResponse executeWithHttpInfo(String accountId, ExecuteRequest3 executeRequest3) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, executeRequest3, null); + public ApiResponse executeWithHttpInfo(String accountId, FreezeAccountRequest freezeAccountRequest) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, freezeAccountRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -192,7 +192,7 @@ public ApiResponse executeWithHttpInfo(String accountId, Ex * Freeze Account by Id (asynchronously) * Freeze Account via API * @param accountId ID of the account to freeze (required) - * @param executeRequest3 Freeze Account Request (required) + * @param freezeAccountRequest Freeze Account Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -203,9 +203,9 @@ public ApiResponse executeWithHttpInfo(String accountId, Ex 0 - */ - public okhttp3.Call executeAsync(String accountId, ExecuteRequest3 executeRequest3, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String accountId, FreezeAccountRequest freezeAccountRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, executeRequest3, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, freezeAccountRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/GetABackImageApi.java b/src/main/java/org/openapitools/client/api/GetABackImageApi.java index 993dfcbd..f77e29b8 100644 --- a/src/main/java/org/openapitools/client/api/GetABackImageApi.java +++ b/src/main/java/org/openapitools/client/api/GetABackImageApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetAFrontImageApi.java b/src/main/java/org/openapitools/client/api/GetAFrontImageApi.java index 81091926..f40223ac 100644 --- a/src/main/java/org/openapitools/client/api/GetAFrontImageApi.java +++ b/src/main/java/org/openapitools/client/api/GetAFrontImageApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetAccountApi.java b/src/main/java/org/openapitools/client/api/GetAccountApi.java index 1458fdef..651888c4 100644 --- a/src/main/java/org/openapitools/client/api/GetAccountApi.java +++ b/src/main/java/org/openapitools/client/api/GetAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetAccountLimitsApi.java b/src/main/java/org/openapitools/client/api/GetAccountLimitsApi.java index 087080d7..18f138cb 100644 --- a/src/main/java/org/openapitools/client/api/GetAccountLimitsApi.java +++ b/src/main/java/org/openapitools/client/api/GetAccountLimitsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetApplicationApi.java b/src/main/java/org/openapitools/client/api/GetApplicationApi.java index 0859e321..e22bb734 100644 --- a/src/main/java/org/openapitools/client/api/GetApplicationApi.java +++ b/src/main/java/org/openapitools/client/api/GetApplicationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetApplicationFormApi.java b/src/main/java/org/openapitools/client/api/GetApplicationFormApi.java index 4db0f2bd..07565302 100644 --- a/src/main/java/org/openapitools/client/api/GetApplicationFormApi.java +++ b/src/main/java/org/openapitools/client/api/GetApplicationFormApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetAtmLocationsListApi.java b/src/main/java/org/openapitools/client/api/GetAtmLocationsListApi.java index 27513e76..4f501765 100644 --- a/src/main/java/org/openapitools/client/api/GetAtmLocationsListApi.java +++ b/src/main/java/org/openapitools/client/api/GetAtmLocationsListApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,6 +27,7 @@ import java.io.IOException; +import org.openapitools.client.model.AtmLocation; import org.openapitools.client.model.ExecuteFilterParameter15; import java.lang.reflect.Type; @@ -142,7 +143,7 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteFilterParameter15 filter, * Get List ATM Locations * Get List ATM Locations from API * @param filter (optional) - * @return List<Object> + * @return List<AtmLocation> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -150,8 +151,8 @@ private okhttp3.Call executeValidateBeforeCall(ExecuteFilterParameter15 filter,
200 Successful Response -
*/ - public List execute(ExecuteFilterParameter15 filter) throws ApiException { - ApiResponse> localVarResp = executeWithHttpInfo(filter); + public List execute(ExecuteFilterParameter15 filter) throws ApiException { + ApiResponse> localVarResp = executeWithHttpInfo(filter); return localVarResp.getData(); } @@ -159,7 +160,7 @@ public List execute(ExecuteFilterParameter15 filter) throws ApiException * Get List ATM Locations * Get List ATM Locations from API * @param filter (optional) - * @return ApiResponse<List<Object>> + * @return ApiResponse<List<AtmLocation>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -167,9 +168,9 @@ public List execute(ExecuteFilterParameter15 filter) throws ApiException
200 Successful Response -
*/ - public ApiResponse> executeWithHttpInfo(ExecuteFilterParameter15 filter) throws ApiException { + public ApiResponse> executeWithHttpInfo(ExecuteFilterParameter15 filter) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(filter, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -186,10 +187,10 @@ public ApiResponse> executeWithHttpInfo(ExecuteFilterParameter15 fi 200 Successful Response - */ - public okhttp3.Call executeAsync(ExecuteFilterParameter15 filter, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call executeAsync(ExecuteFilterParameter15 filter, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(filter, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/org/openapitools/client/api/GetAuthorizationApi.java b/src/main/java/org/openapitools/client/api/GetAuthorizationApi.java index 2e863d7d..e3467ef4 100644 --- a/src/main/java/org/openapitools/client/api/GetAuthorizationApi.java +++ b/src/main/java/org/openapitools/client/api/GetAuthorizationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetAuthorizationRequestApi.java b/src/main/java/org/openapitools/client/api/GetAuthorizationRequestApi.java index fd6f0618..de8dab80 100644 --- a/src/main/java/org/openapitools/client/api/GetAuthorizationRequestApi.java +++ b/src/main/java/org/openapitools/client/api/GetAuthorizationRequestApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetBankVerificationPdfApi.java b/src/main/java/org/openapitools/client/api/GetBankVerificationPdfApi.java index ed97875d..59cb7359 100644 --- a/src/main/java/org/openapitools/client/api/GetBankVerificationPdfApi.java +++ b/src/main/java/org/openapitools/client/api/GetBankVerificationPdfApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCardApi.java b/src/main/java/org/openapitools/client/api/GetCardApi.java index 2157f736..e2d7fd3e 100644 --- a/src/main/java/org/openapitools/client/api/GetCardApi.java +++ b/src/main/java/org/openapitools/client/api/GetCardApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCardLimitsApi.java b/src/main/java/org/openapitools/client/api/GetCardLimitsApi.java index 3aee2c88..eaf5cad4 100644 --- a/src/main/java/org/openapitools/client/api/GetCardLimitsApi.java +++ b/src/main/java/org/openapitools/client/api/GetCardLimitsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCardPinStatusApi.java b/src/main/java/org/openapitools/client/api/GetCardPinStatusApi.java index 34df3d9c..e5fd3a41 100644 --- a/src/main/java/org/openapitools/client/api/GetCardPinStatusApi.java +++ b/src/main/java/org/openapitools/client/api/GetCardPinStatusApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCheckDepositApi.java b/src/main/java/org/openapitools/client/api/GetCheckDepositApi.java index 066a3518..e3fbdfaa 100644 --- a/src/main/java/org/openapitools/client/api/GetCheckDepositApi.java +++ b/src/main/java/org/openapitools/client/api/GetCheckDepositApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCheckDepositBackImageApi.java b/src/main/java/org/openapitools/client/api/GetCheckDepositBackImageApi.java index 9379b9c9..bcb4a55a 100644 --- a/src/main/java/org/openapitools/client/api/GetCheckDepositBackImageApi.java +++ b/src/main/java/org/openapitools/client/api/GetCheckDepositBackImageApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCheckDepositFrontImageApi.java b/src/main/java/org/openapitools/client/api/GetCheckDepositFrontImageApi.java index aabfc756..15f432be 100644 --- a/src/main/java/org/openapitools/client/api/GetCheckDepositFrontImageApi.java +++ b/src/main/java/org/openapitools/client/api/GetCheckDepositFrontImageApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/GetCheckPaymentApi.java index 852ffb84..e0c797fd 100644 --- a/src/main/java/org/openapitools/client/api/GetCheckPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/GetCheckPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCounterpartyApi.java b/src/main/java/org/openapitools/client/api/GetCounterpartyApi.java index 44a72a9d..e35ca831 100644 --- a/src/main/java/org/openapitools/client/api/GetCounterpartyApi.java +++ b/src/main/java/org/openapitools/client/api/GetCounterpartyApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCounterpartyBalanceApi.java b/src/main/java/org/openapitools/client/api/GetCounterpartyBalanceApi.java index 2e703337..caa58047 100644 --- a/src/main/java/org/openapitools/client/api/GetCounterpartyBalanceApi.java +++ b/src/main/java/org/openapitools/client/api/GetCounterpartyBalanceApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetCustomerApi.java b/src/main/java/org/openapitools/client/api/GetCustomerApi.java index 898d7a45..f032fdc9 100644 --- a/src/main/java/org/openapitools/client/api/GetCustomerApi.java +++ b/src/main/java/org/openapitools/client/api/GetCustomerApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetDisputeApi.java b/src/main/java/org/openapitools/client/api/GetDisputeApi.java index 6a9b3a60..8d9efcfb 100644 --- a/src/main/java/org/openapitools/client/api/GetDisputeApi.java +++ b/src/main/java/org/openapitools/client/api/GetDisputeApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetEventApi.java b/src/main/java/org/openapitools/client/api/GetEventApi.java index 91e14c2e..3db525b3 100644 --- a/src/main/java/org/openapitools/client/api/GetEventApi.java +++ b/src/main/java/org/openapitools/client/api/GetEventApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetInstitutionApi.java b/src/main/java/org/openapitools/client/api/GetInstitutionApi.java index d22cbf7e..9466a71d 100644 --- a/src/main/java/org/openapitools/client/api/GetInstitutionApi.java +++ b/src/main/java/org/openapitools/client/api/GetInstitutionApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListAccountEndOfDayBalancesHistoryApi.java b/src/main/java/org/openapitools/client/api/GetListAccountEndOfDayBalancesHistoryApi.java index ac30a51b..448d81e0 100644 --- a/src/main/java/org/openapitools/client/api/GetListAccountEndOfDayBalancesHistoryApi.java +++ b/src/main/java/org/openapitools/client/api/GetListAccountEndOfDayBalancesHistoryApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListAccountsApi.java b/src/main/java/org/openapitools/client/api/GetListAccountsApi.java index 9cc33050..bb7a1d34 100644 --- a/src/main/java/org/openapitools/client/api/GetListAccountsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListAccountsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListApplicationFormsApi.java b/src/main/java/org/openapitools/client/api/GetListApplicationFormsApi.java index 42966422..4f1c4423 100644 --- a/src/main/java/org/openapitools/client/api/GetListApplicationFormsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListApplicationFormsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListApplicationsApi.java b/src/main/java/org/openapitools/client/api/GetListApplicationsApi.java index d86fe578..0e4ef257 100644 --- a/src/main/java/org/openapitools/client/api/GetListApplicationsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListApplicationsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListAuthorizationRequestsApi.java b/src/main/java/org/openapitools/client/api/GetListAuthorizationRequestsApi.java index 367cfd0a..f1d2d28d 100644 --- a/src/main/java/org/openapitools/client/api/GetListAuthorizationRequestsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListAuthorizationRequestsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,9 +27,9 @@ import java.io.IOException; -import org.openapitools.client.model.Execute200Response2; import org.openapitools.client.model.ExecuteFilterParameter9; import org.openapitools.client.model.ListPageParametersObject; +import org.openapitools.client.model.UnitListAuthorizationRequestsResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -150,7 +150,7 @@ private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, Ex * Get List Authorization Requests from API * @param page (optional) * @param filter (optional) - * @return Execute200Response2 + * @return UnitListAuthorizationRequestsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -158,8 +158,8 @@ private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, Ex
200 Successful Response -
*/ - public Execute200Response2 execute(ListPageParametersObject page, ExecuteFilterParameter9 filter) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter); + public UnitListAuthorizationRequestsResponse execute(ListPageParametersObject page, ExecuteFilterParameter9 filter) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(page, filter); return localVarResp.getData(); } @@ -168,7 +168,7 @@ public Execute200Response2 execute(ListPageParametersObject page, ExecuteFilterP * Get List Authorization Requests from API * @param page (optional) * @param filter (optional) - * @return ApiResponse<Execute200Response2> + * @return ApiResponse<UnitListAuthorizationRequestsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -176,9 +176,9 @@ public Execute200Response2 execute(ListPageParametersObject page, ExecuteFilterP
200 Successful Response -
*/ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter9 filter) throws ApiException { + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter9 filter) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -196,10 +196,10 @@ public ApiResponse executeWithHttpInfo(ListPageParametersOb 200 Successful Response - */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter9 filter, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter9 filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/org/openapitools/client/api/GetListAuthorizationsApi.java b/src/main/java/org/openapitools/client/api/GetListAuthorizationsApi.java index 77ae0d9e..da39780e 100644 --- a/src/main/java/org/openapitools/client/api/GetListAuthorizationsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListAuthorizationsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,9 +27,9 @@ import java.io.IOException; -import org.openapitools.client.model.Execute200Response1; import org.openapitools.client.model.ExecuteFilterParameter8; import org.openapitools.client.model.ListPageParametersObject; +import org.openapitools.client.model.UnitListAuthorizationsResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -156,7 +156,7 @@ private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, Ex * @param page (optional) * @param filter (optional) * @param sort (optional) - * @return Execute200Response1 + * @return UnitListAuthorizationsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -164,8 +164,8 @@ private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, Ex
200 Successful Response -
*/ - public Execute200Response1 execute(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); + public UnitListAuthorizationsResponse execute(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); return localVarResp.getData(); } @@ -175,7 +175,7 @@ public Execute200Response1 execute(ListPageParametersObject page, ExecuteFilterP * @param page (optional) * @param filter (optional) * @param sort (optional) - * @return ApiResponse<Execute200Response1> + * @return ApiResponse<UnitListAuthorizationsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -183,9 +183,9 @@ public Execute200Response1 execute(ListPageParametersObject page, ExecuteFilterP
200 Successful Response -
*/ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort) throws ApiException { + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -204,10 +204,10 @@ public ApiResponse executeWithHttpInfo(ListPageParametersOb 200 Successful Response - */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/org/openapitools/client/api/GetListCheckDepositsApi.java b/src/main/java/org/openapitools/client/api/GetListCheckDepositsApi.java index b38e63a9..8519764a 100644 --- a/src/main/java/org/openapitools/client/api/GetListCheckDepositsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListCheckDepositsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,9 +27,9 @@ import java.io.IOException; -import org.openapitools.client.model.CheckDeposit; import org.openapitools.client.model.ExecuteFilterParameter13; import org.openapitools.client.model.ListPageParametersObject; +import org.openapitools.client.model.UnitListCheckDepositsResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -162,7 +162,7 @@ private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, Ex * @param filter (optional) * @param sort (optional) * @param include (optional) - * @return List<CheckDeposit> + * @return UnitListCheckDepositsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, Ex
200 Successful Response -
*/ - public List execute(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include) throws ApiException { - ApiResponse> localVarResp = executeWithHttpInfo(page, filter, sort, include); + public UnitListCheckDepositsResponse execute(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort, include); return localVarResp.getData(); } @@ -182,7 +182,7 @@ public List execute(ListPageParametersObject page, ExecuteFilterPa * @param filter (optional) * @param sort (optional) * @param include (optional) - * @return ApiResponse<List<CheckDeposit>> + * @return ApiResponse<UnitListCheckDepositsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -190,9 +190,9 @@ public List execute(ListPageParametersObject page, ExecuteFilterPa
200 Successful Response -
*/ - public ApiResponse> executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include) throws ApiException { + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -212,10 +212,10 @@ public ApiResponse> executeWithHttpInfo(ListPageParametersObj 200 Successful Response - */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/org/openapitools/client/api/GetListCheckPaymentsApi.java b/src/main/java/org/openapitools/client/api/GetListCheckPaymentsApi.java index 54c57777..f7f26310 100644 --- a/src/main/java/org/openapitools/client/api/GetListCheckPaymentsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListCheckPaymentsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,9 +27,9 @@ import java.io.IOException; -import org.openapitools.client.model.Execute200Response3; import org.openapitools.client.model.ExecuteFilterParameter19; import org.openapitools.client.model.ListPageParametersObject; +import org.openapitools.client.model.UnitListCheckPaymentsResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -162,7 +162,7 @@ private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, Ex * @param filter (optional) * @param sort (optional) * @param include (optional) - * @return Execute200Response3 + * @return UnitListCheckPaymentsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -170,8 +170,8 @@ private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, Ex
200 Successful Response -
*/ - public Execute200Response3 execute(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort, include); + public UnitListCheckPaymentsResponse execute(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort, include); return localVarResp.getData(); } @@ -182,7 +182,7 @@ public Execute200Response3 execute(ListPageParametersObject page, ExecuteFilterP * @param filter (optional) * @param sort (optional) * @param include (optional) - * @return ApiResponse<Execute200Response3> + * @return ApiResponse<UnitListCheckPaymentsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -190,9 +190,9 @@ public Execute200Response3 execute(ListPageParametersObject page, ExecuteFilterP
200 Successful Response -
*/ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include) throws ApiException { + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -212,10 +212,10 @@ public ApiResponse executeWithHttpInfo(ListPageParametersOb 200 Successful Response - */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/org/openapitools/client/api/GetListCounterpartiesApi.java b/src/main/java/org/openapitools/client/api/GetListCounterpartiesApi.java index 76697940..9e15d84d 100644 --- a/src/main/java/org/openapitools/client/api/GetListCounterpartiesApi.java +++ b/src/main/java/org/openapitools/client/api/GetListCounterpartiesApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListCustomersApi.java b/src/main/java/org/openapitools/client/api/GetListCustomersApi.java index 2138902d..ceb9ea34 100644 --- a/src/main/java/org/openapitools/client/api/GetListCustomersApi.java +++ b/src/main/java/org/openapitools/client/api/GetListCustomersApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListDisputesApi.java b/src/main/java/org/openapitools/client/api/GetListDisputesApi.java index f13d8d91..331bf3fd 100644 --- a/src/main/java/org/openapitools/client/api/GetListDisputesApi.java +++ b/src/main/java/org/openapitools/client/api/GetListDisputesApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListEventsApi.java b/src/main/java/org/openapitools/client/api/GetListEventsApi.java index fc679d63..80f629b9 100644 --- a/src/main/java/org/openapitools/client/api/GetListEventsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListEventsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListOfCardsApi.java b/src/main/java/org/openapitools/client/api/GetListOfCardsApi.java index ff9f3801..0a1a2135 100644 --- a/src/main/java/org/openapitools/client/api/GetListOfCardsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListOfCardsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListOfDocumentsApi.java b/src/main/java/org/openapitools/client/api/GetListOfDocumentsApi.java index 52f443a0..afe4a046 100644 --- a/src/main/java/org/openapitools/client/api/GetListOfDocumentsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListOfDocumentsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.Execute200Response; +import org.openapitools.client.model.UnitListDocumentsResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -144,7 +144,7 @@ private okhttp3.Call executeValidateBeforeCall(String applicationId, final ApiCa * Get List of Documents * Get List of Documents via API * @param applicationId ID of the application to get documents for (required) - * @return Execute200Response + * @return UnitListDocumentsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -152,8 +152,8 @@ private okhttp3.Call executeValidateBeforeCall(String applicationId, final ApiCa
200 Successful Response -
*/ - public Execute200Response execute(String applicationId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId); + public UnitListDocumentsResponse execute(String applicationId) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(applicationId); return localVarResp.getData(); } @@ -161,7 +161,7 @@ public Execute200Response execute(String applicationId) throws ApiException { * Get List of Documents * Get List of Documents via API * @param applicationId ID of the application to get documents for (required) - * @return ApiResponse<Execute200Response> + * @return ApiResponse<UnitListDocumentsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -169,9 +169,9 @@ public Execute200Response execute(String applicationId) throws ApiException {
200 Successful Response -
*/ - public ApiResponse executeWithHttpInfo(String applicationId) throws ApiException { + public ApiResponse executeWithHttpInfo(String applicationId) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -188,10 +188,10 @@ public ApiResponse executeWithHttpInfo(String applicationId) 200 Successful Response - */ - public okhttp3.Call executeAsync(String applicationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String applicationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/org/openapitools/client/api/GetListOrgApiTokensApi.java b/src/main/java/org/openapitools/client/api/GetListOrgApiTokensApi.java index 13d1173f..2b84e569 100644 --- a/src/main/java/org/openapitools/client/api/GetListOrgApiTokensApi.java +++ b/src/main/java/org/openapitools/client/api/GetListOrgApiTokensApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListPaymentsApi.java b/src/main/java/org/openapitools/client/api/GetListPaymentsApi.java index b4e5d6bb..34e4d403 100644 --- a/src/main/java/org/openapitools/client/api/GetListPaymentsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListPaymentsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListRecurringPaymentsApi.java b/src/main/java/org/openapitools/client/api/GetListRecurringPaymentsApi.java index 378345a1..b5c4057a 100644 --- a/src/main/java/org/openapitools/client/api/GetListRecurringPaymentsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListRecurringPaymentsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListRepaymentsApi.java b/src/main/java/org/openapitools/client/api/GetListRepaymentsApi.java index 77c13c1c..fd4e0abf 100644 --- a/src/main/java/org/openapitools/client/api/GetListRepaymentsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListRepaymentsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListRewardsApi.java b/src/main/java/org/openapitools/client/api/GetListRewardsApi.java index ea2fbf2f..6c0d1eaa 100644 --- a/src/main/java/org/openapitools/client/api/GetListRewardsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListRewardsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListStatementsApi.java b/src/main/java/org/openapitools/client/api/GetListStatementsApi.java index fde5c332..decea2da 100644 --- a/src/main/java/org/openapitools/client/api/GetListStatementsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListStatementsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListTransactionsApi.java b/src/main/java/org/openapitools/client/api/GetListTransactionsApi.java index 3ed6df92..04a42b05 100644 --- a/src/main/java/org/openapitools/client/api/GetListTransactionsApi.java +++ b/src/main/java/org/openapitools/client/api/GetListTransactionsApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetListWebhooksApi.java b/src/main/java/org/openapitools/client/api/GetListWebhooksApi.java index 6a93fa25..b72a8c4c 100644 --- a/src/main/java/org/openapitools/client/api/GetListWebhooksApi.java +++ b/src/main/java/org/openapitools/client/api/GetListWebhooksApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetPaymentApi.java b/src/main/java/org/openapitools/client/api/GetPaymentApi.java index 1c3ac725..dd08ea21 100644 --- a/src/main/java/org/openapitools/client/api/GetPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/GetPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetReceivedPaymentApi.java b/src/main/java/org/openapitools/client/api/GetReceivedPaymentApi.java index d8295056..405e2cf3 100644 --- a/src/main/java/org/openapitools/client/api/GetReceivedPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/GetReceivedPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetReceivedPaymentsListApi.java b/src/main/java/org/openapitools/client/api/GetReceivedPaymentsListApi.java index 8043c698..ee4f079b 100644 --- a/src/main/java/org/openapitools/client/api/GetReceivedPaymentsListApi.java +++ b/src/main/java/org/openapitools/client/api/GetReceivedPaymentsListApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetRecurringPaymentApi.java b/src/main/java/org/openapitools/client/api/GetRecurringPaymentApi.java index b46dd4e7..6e71c00b 100644 --- a/src/main/java/org/openapitools/client/api/GetRecurringPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/GetRecurringPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetRepaymentApi.java b/src/main/java/org/openapitools/client/api/GetRepaymentApi.java index c9ba6cf8..3dea4ed0 100644 --- a/src/main/java/org/openapitools/client/api/GetRepaymentApi.java +++ b/src/main/java/org/openapitools/client/api/GetRepaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetRewardApi.java b/src/main/java/org/openapitools/client/api/GetRewardApi.java index e3543b02..57f1f422 100644 --- a/src/main/java/org/openapitools/client/api/GetRewardApi.java +++ b/src/main/java/org/openapitools/client/api/GetRewardApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetStatementHtmlApi.java b/src/main/java/org/openapitools/client/api/GetStatementHtmlApi.java index 31f182d3..d92fc08a 100644 --- a/src/main/java/org/openapitools/client/api/GetStatementHtmlApi.java +++ b/src/main/java/org/openapitools/client/api/GetStatementHtmlApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetStatementPdfApi.java b/src/main/java/org/openapitools/client/api/GetStatementPdfApi.java index 9dbb62db..8854a76a 100644 --- a/src/main/java/org/openapitools/client/api/GetStatementPdfApi.java +++ b/src/main/java/org/openapitools/client/api/GetStatementPdfApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetTransactionApi.java b/src/main/java/org/openapitools/client/api/GetTransactionApi.java index 543d81d9..c2fe35c9 100644 --- a/src/main/java/org/openapitools/client/api/GetTransactionApi.java +++ b/src/main/java/org/openapitools/client/api/GetTransactionApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/GetWebhookApi.java b/src/main/java/org/openapitools/client/api/GetWebhookApi.java index 93c86650..3ca25c32 100644 --- a/src/main/java/org/openapitools/client/api/GetWebhookApi.java +++ b/src/main/java/org/openapitools/client/api/GetWebhookApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/ReopenAnAccountApi.java b/src/main/java/org/openapitools/client/api/ReopenAnAccountApi.java index dd1a1898..fd6e9735 100644 --- a/src/main/java/org/openapitools/client/api/ReopenAnAccountApi.java +++ b/src/main/java/org/openapitools/client/api/ReopenAnAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/ReportCardAsLostApi.java b/src/main/java/org/openapitools/client/api/ReportCardAsLostApi.java index 7e980f50..df0eb93e 100644 --- a/src/main/java/org/openapitools/client/api/ReportCardAsLostApi.java +++ b/src/main/java/org/openapitools/client/api/ReportCardAsLostApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/ReportCardAsStolenApi.java b/src/main/java/org/openapitools/client/api/ReportCardAsStolenApi.java index 7216f8c7..8e436bca 100644 --- a/src/main/java/org/openapitools/client/api/ReportCardAsStolenApi.java +++ b/src/main/java/org/openapitools/client/api/ReportCardAsStolenApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/ReturnCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/ReturnCheckPaymentApi.java index 04179885..635d09f1 100644 --- a/src/main/java/org/openapitools/client/api/ReturnCheckPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/ReturnCheckPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest21; +import org.openapitools.client.model.ReturnCheckPaymentRequest; import org.openapitools.client.model.UnitCheckPaymentResponse; import java.lang.reflect.Type; @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for execute * @param checkPaymentId ID of the check payment to return (required) - * @param executeRequest21 Return Check Payment Request (required) + * @param returnCheckPaymentRequest Return Check Payment Request (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 200 Successful Response - */ - public okhttp3.Call executeCall(String checkPaymentId, ExecuteRequest21 executeRequest21, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +100,7 @@ public okhttp3.Call executeCall(String checkPaymentId, ExecuteRequest21 executeR basePath = null; } - Object localVarPostBody = executeRequest21; + Object localVarPostBody = returnCheckPaymentRequest; // create path and map variables String localVarPath = "/check-payments/{checkPaymentId}/return" @@ -133,18 +133,18 @@ public okhttp3.Call executeCall(String checkPaymentId, ExecuteRequest21 executeR } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ExecuteRequest21 executeRequest21, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'checkPaymentId' is set if (checkPaymentId == null) { throw new ApiException("Missing the required parameter 'checkPaymentId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest21' is set - if (executeRequest21 == null) { - throw new ApiException("Missing the required parameter 'executeRequest21' when calling execute(Async)"); + // verify the required parameter 'returnCheckPaymentRequest' is set + if (returnCheckPaymentRequest == null) { + throw new ApiException("Missing the required parameter 'returnCheckPaymentRequest' when calling execute(Async)"); } - return executeCall(checkPaymentId, executeRequest21, _callback); + return executeCall(checkPaymentId, returnCheckPaymentRequest, _callback); } @@ -152,7 +152,7 @@ private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ExecuteReq * Return Check Payment by Id * Return a Check Payment via API * @param checkPaymentId ID of the check payment to return (required) - * @param executeRequest21 Return Check Payment Request (required) + * @param returnCheckPaymentRequest Return Check Payment Request (required) * @return UnitCheckPaymentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -161,8 +161,8 @@ private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ExecuteReq 200 Successful Response - */ - public UnitCheckPaymentResponse execute(String checkPaymentId, ExecuteRequest21 executeRequest21) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId, executeRequest21); + public UnitCheckPaymentResponse execute(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId, returnCheckPaymentRequest); return localVarResp.getData(); } @@ -170,7 +170,7 @@ public UnitCheckPaymentResponse execute(String checkPaymentId, ExecuteRequest21 * Return Check Payment by Id * Return a Check Payment via API * @param checkPaymentId ID of the check payment to return (required) - * @param executeRequest21 Return Check Payment Request (required) + * @param returnCheckPaymentRequest Return Check Payment Request (required) * @return ApiResponse<UnitCheckPaymentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +179,8 @@ public UnitCheckPaymentResponse execute(String checkPaymentId, ExecuteRequest21 200 Successful Response - */ - public ApiResponse executeWithHttpInfo(String checkPaymentId, ExecuteRequest21 executeRequest21) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, executeRequest21, null); + public ApiResponse executeWithHttpInfo(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, returnCheckPaymentRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,7 +189,7 @@ public ApiResponse executeWithHttpInfo(String checkPay * Return Check Payment by Id (asynchronously) * Return a Check Payment via API * @param checkPaymentId ID of the check payment to return (required) - * @param executeRequest21 Return Check Payment Request (required) + * @param returnCheckPaymentRequest Return Check Payment Request (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -199,9 +199,9 @@ public ApiResponse executeWithHttpInfo(String checkPay 200 Successful Response - */ - public okhttp3.Call executeAsync(String checkPaymentId, ExecuteRequest21 executeRequest21, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, executeRequest21, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, returnCheckPaymentRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/RevokeOrgApiTokenApi.java b/src/main/java/org/openapitools/client/api/RevokeOrgApiTokenApi.java index 57978044..3b3382cc 100644 --- a/src/main/java/org/openapitools/client/api/RevokeOrgApiTokenApi.java +++ b/src/main/java/org/openapitools/client/api/RevokeOrgApiTokenApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UnfreezeACardApi.java b/src/main/java/org/openapitools/client/api/UnfreezeACardApi.java index b2d1ab6a..9258ed5b 100644 --- a/src/main/java/org/openapitools/client/api/UnfreezeACardApi.java +++ b/src/main/java/org/openapitools/client/api/UnfreezeACardApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UnfreezeAccountApi.java b/src/main/java/org/openapitools/client/api/UnfreezeAccountApi.java index d5bf17e5..617757a7 100644 --- a/src/main/java/org/openapitools/client/api/UnfreezeAccountApi.java +++ b/src/main/java/org/openapitools/client/api/UnfreezeAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdateAccountApi.java b/src/main/java/org/openapitools/client/api/UpdateAccountApi.java index a2ff90ab..df933c5b 100644 --- a/src/main/java/org/openapitools/client/api/UpdateAccountApi.java +++ b/src/main/java/org/openapitools/client/api/UpdateAccountApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdateApplicationApi.java b/src/main/java/org/openapitools/client/api/UpdateApplicationApi.java index 3a7276de..8a70bb3f 100644 --- a/src/main/java/org/openapitools/client/api/UpdateApplicationApi.java +++ b/src/main/java/org/openapitools/client/api/UpdateApplicationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdateCardApi.java b/src/main/java/org/openapitools/client/api/UpdateCardApi.java index 949dbc0a..b8207018 100644 --- a/src/main/java/org/openapitools/client/api/UpdateCardApi.java +++ b/src/main/java/org/openapitools/client/api/UpdateCardApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdateCheckDepositApi.java b/src/main/java/org/openapitools/client/api/UpdateCheckDepositApi.java index 744fb5c4..cb5b98a0 100644 --- a/src/main/java/org/openapitools/client/api/UpdateCheckDepositApi.java +++ b/src/main/java/org/openapitools/client/api/UpdateCheckDepositApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdateCounterpartyApi.java b/src/main/java/org/openapitools/client/api/UpdateCounterpartyApi.java index d352b8fa..410e9029 100644 --- a/src/main/java/org/openapitools/client/api/UpdateCounterpartyApi.java +++ b/src/main/java/org/openapitools/client/api/UpdateCounterpartyApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdateCustomerApi.java b/src/main/java/org/openapitools/client/api/UpdateCustomerApi.java index 896eb45b..d01ef26c 100644 --- a/src/main/java/org/openapitools/client/api/UpdateCustomerApi.java +++ b/src/main/java/org/openapitools/client/api/UpdateCustomerApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdatePaymentApi.java b/src/main/java/org/openapitools/client/api/UpdatePaymentApi.java index 25179db6..4b6e318e 100644 --- a/src/main/java/org/openapitools/client/api/UpdatePaymentApi.java +++ b/src/main/java/org/openapitools/client/api/UpdatePaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdateReceivedPaymentApi.java b/src/main/java/org/openapitools/client/api/UpdateReceivedPaymentApi.java index 6ee11184..7db5e73b 100644 --- a/src/main/java/org/openapitools/client/api/UpdateReceivedPaymentApi.java +++ b/src/main/java/org/openapitools/client/api/UpdateReceivedPaymentApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdateTransactionApi.java b/src/main/java/org/openapitools/client/api/UpdateTransactionApi.java index aaf0a45c..72d9065a 100644 --- a/src/main/java/org/openapitools/client/api/UpdateTransactionApi.java +++ b/src/main/java/org/openapitools/client/api/UpdateTransactionApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UpdateWebhookApi.java b/src/main/java/org/openapitools/client/api/UpdateWebhookApi.java index b7860ae8..35f5140b 100644 --- a/src/main/java/org/openapitools/client/api/UpdateWebhookApi.java +++ b/src/main/java/org/openapitools/client/api/UpdateWebhookApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationApi.java index 94aa4c3d..08675f02 100644 --- a/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationApi.java +++ b/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationBackSideApi.java b/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationBackSideApi.java index 3db3e4d9..53765eeb 100644 --- a/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationBackSideApi.java +++ b/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationBackSideApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationApi.java index 26ea4f1c..22bc2979 100644 --- a/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationApi.java +++ b/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationBackSideApi.java b/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationBackSideApi.java index 6b3d401c..d3b70b45 100644 --- a/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationBackSideApi.java +++ b/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationBackSideApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationApi.java index 17caea00..6fb44773 100644 --- a/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationApi.java +++ b/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationBackSideApi.java b/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationBackSideApi.java index 952262f7..13b0e3db 100644 --- a/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationBackSideApi.java +++ b/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationBackSideApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/api/VerifyADocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/VerifyADocumentForAnApplicationApi.java index a2df7c71..40fffc3b 100644 --- a/src/main/java/org/openapitools/client/api/VerifyADocumentForAnApplicationApi.java +++ b/src/main/java/org/openapitools/client/api/VerifyADocumentForAnApplicationApi.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,8 +27,8 @@ import java.io.IOException; -import org.openapitools.client.model.ExecuteRequest2; import org.openapitools.client.model.UnitDocumentResponse; +import org.openapitools.client.model.VerifyDocument; import java.lang.reflect.Type; import java.util.ArrayList; @@ -77,7 +77,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * Build call for execute * @param applicationId ID of the application to verify a file for (required) * @param documentId ID of the document to verify (required) - * @param executeRequest2 Verify Document (required) + * @param verifyDocument Verify Document (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -87,7 +87,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 200 Successful Response - */ - public okhttp3.Call executeCall(String applicationId, String documentId, ExecuteRequest2 executeRequest2, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeCall(String applicationId, String documentId, VerifyDocument verifyDocument, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -101,7 +101,7 @@ public okhttp3.Call executeCall(String applicationId, String documentId, Execute basePath = null; } - Object localVarPostBody = executeRequest2; + Object localVarPostBody = verifyDocument; // create path and map variables String localVarPath = "/applications/{applicationId}/documents/{documentId}/verify" @@ -135,7 +135,7 @@ public okhttp3.Call executeCall(String applicationId, String documentId, Execute } @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, ExecuteRequest2 executeRequest2, final ApiCallback _callback) throws ApiException { + private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, VerifyDocument verifyDocument, final ApiCallback _callback) throws ApiException { // verify the required parameter 'applicationId' is set if (applicationId == null) { throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); @@ -146,12 +146,12 @@ private okhttp3.Call executeValidateBeforeCall(String applicationId, String docu throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); } - // verify the required parameter 'executeRequest2' is set - if (executeRequest2 == null) { - throw new ApiException("Missing the required parameter 'executeRequest2' when calling execute(Async)"); + // verify the required parameter 'verifyDocument' is set + if (verifyDocument == null) { + throw new ApiException("Missing the required parameter 'verifyDocument' when calling execute(Async)"); } - return executeCall(applicationId, documentId, executeRequest2, _callback); + return executeCall(applicationId, documentId, verifyDocument, _callback); } @@ -160,7 +160,7 @@ private okhttp3.Call executeValidateBeforeCall(String applicationId, String docu * Verify a document via API * @param applicationId ID of the application to verify a file for (required) * @param documentId ID of the document to verify (required) - * @param executeRequest2 Verify Document (required) + * @param verifyDocument Verify Document (required) * @return UnitDocumentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -169,8 +169,8 @@ private okhttp3.Call executeValidateBeforeCall(String applicationId, String docu 200 Successful Response - */ - public UnitDocumentResponse execute(String applicationId, String documentId, ExecuteRequest2 executeRequest2) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId, executeRequest2); + public UnitDocumentResponse execute(String applicationId, String documentId, VerifyDocument verifyDocument) throws ApiException { + ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId, verifyDocument); return localVarResp.getData(); } @@ -179,7 +179,7 @@ public UnitDocumentResponse execute(String applicationId, String documentId, Exe * Verify a document via API * @param applicationId ID of the application to verify a file for (required) * @param documentId ID of the document to verify (required) - * @param executeRequest2 Verify Document (required) + * @param verifyDocument Verify Document (required) * @return ApiResponse<UnitDocumentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -188,8 +188,8 @@ public UnitDocumentResponse execute(String applicationId, String documentId, Exe 200 Successful Response - */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId, ExecuteRequest2 executeRequest2) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, executeRequest2, null); + public ApiResponse executeWithHttpInfo(String applicationId, String documentId, VerifyDocument verifyDocument) throws ApiException { + okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, verifyDocument, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -199,7 +199,7 @@ public ApiResponse executeWithHttpInfo(String applicationI * Verify a document via API * @param applicationId ID of the application to verify a file for (required) * @param documentId ID of the document to verify (required) - * @param executeRequest2 Verify Document (required) + * @param verifyDocument Verify Document (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -209,9 +209,9 @@ public ApiResponse executeWithHttpInfo(String applicationI 200 Successful Response - */ - public okhttp3.Call executeAsync(String applicationId, String documentId, ExecuteRequest2 executeRequest2, final ApiCallback _callback) throws ApiException { + public okhttp3.Call executeAsync(String applicationId, String documentId, VerifyDocument verifyDocument, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, executeRequest2, _callback); + okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, verifyDocument, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 1ea355a6..2662d889 100644 --- a/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/auth/Authentication.java b/src/main/java/org/openapitools/client/auth/Authentication.java index 0222b8ad..c4887ab0 100644 --- a/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/src/main/java/org/openapitools/client/auth/Authentication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index 9f17c1c6..90b4afa7 100644 --- a/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 8a963ad8..ed7897f8 100644 --- a/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index 8aa1867d..131471be 100644 --- a/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Account.java b/src/main/java/org/openapitools/client/model/Account.java index 8aaa2a15..4d19d4fe 100644 --- a/src/main/java/org/openapitools/client/model/Account.java +++ b/src/main/java/org/openapitools/client/model/Account.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AccountEndOfDay.java b/src/main/java/org/openapitools/client/model/AccountEndOfDay.java index 46bb45d8..8be33a17 100644 --- a/src/main/java/org/openapitools/client/model/AccountEndOfDay.java +++ b/src/main/java/org/openapitools/client/model/AccountEndOfDay.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AccountEndOfDayAttributes.java b/src/main/java/org/openapitools/client/model/AccountEndOfDayAttributes.java index 083aecbc..ac7c29f7 100644 --- a/src/main/java/org/openapitools/client/model/AccountEndOfDayAttributes.java +++ b/src/main/java/org/openapitools/client/model/AccountEndOfDayAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransaction.java b/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransaction.java index 2d8e4c45..9503ba0e 100644 --- a/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransaction.java +++ b/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransactionAllOfAttributes.java index 0b6634e0..889e514d 100644 --- a/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AccountRelationship.java b/src/main/java/org/openapitools/client/model/AccountRelationship.java index f721c82e..8d748bc4 100644 --- a/src/main/java/org/openapitools/client/model/AccountRelationship.java +++ b/src/main/java/org/openapitools/client/model/AccountRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AccountRelationship1.java b/src/main/java/org/openapitools/client/model/AccountRelationship1.java index 1d0a9662..01fe1faf 100644 --- a/src/main/java/org/openapitools/client/model/AccountRelationship1.java +++ b/src/main/java/org/openapitools/client/model/AccountRelationship1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AccountRelationship2.java b/src/main/java/org/openapitools/client/model/AccountRelationship2.java index 7f93f7e1..396aa336 100644 --- a/src/main/java/org/openapitools/client/model/AccountRelationship2.java +++ b/src/main/java/org/openapitools/client/model/AccountRelationship2.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AccountRelationship2Data.java b/src/main/java/org/openapitools/client/model/AccountRelationship2Data.java index ffa21475..ecdec658 100644 --- a/src/main/java/org/openapitools/client/model/AccountRelationship2Data.java +++ b/src/main/java/org/openapitools/client/model/AccountRelationship2Data.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AccountRelationshipData.java b/src/main/java/org/openapitools/client/model/AccountRelationshipData.java index 53bcc3df..c3656dc2 100644 --- a/src/main/java/org/openapitools/client/model/AccountRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/AccountRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchPayment.java b/src/main/java/org/openapitools/client/model/AchPayment.java index eab74f7e..4e99ad15 100644 --- a/src/main/java/org/openapitools/client/model/AchPayment.java +++ b/src/main/java/org/openapitools/client/model/AchPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AchPaymentAllOfAttributes.java index 6f054ee7..5ddb160b 100644 --- a/src/main/java/org/openapitools/client/model/AchPaymentAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/AchPaymentAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -559,50 +559,6 @@ public void setClearingDaysOverride(Integer clearingDaysOverride) { this.clearingDaysOverride = clearingDaysOverride; } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the AchPaymentAllOfAttributes instance itself - */ - public AchPaymentAllOfAttributes putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -629,13 +585,12 @@ public boolean equals(Object o) { Objects.equals(this.traceNumber, achPaymentAllOfAttributes.traceNumber) && Objects.equals(this.sameDay, achPaymentAllOfAttributes.sameDay) && Objects.equals(this.counterpartyVerificationMethod, achPaymentAllOfAttributes.counterpartyVerificationMethod) && - Objects.equals(this.clearingDaysOverride, achPaymentAllOfAttributes.clearingDaysOverride)&& - Objects.equals(this.additionalProperties, achPaymentAllOfAttributes.additionalProperties); + Objects.equals(this.clearingDaysOverride, achPaymentAllOfAttributes.clearingDaysOverride); } @Override public int hashCode() { - return Objects.hash(createdAt, amount, direction, description, addenda, counterparty, tags, status, settlementDate, reason, expectedCompletionDate, secCode, traceNumber, sameDay, counterpartyVerificationMethod, clearingDaysOverride, additionalProperties); + return Objects.hash(createdAt, amount, direction, description, addenda, counterparty, tags, status, settlementDate, reason, expectedCompletionDate, secCode, traceNumber, sameDay, counterpartyVerificationMethod, clearingDaysOverride); } @Override @@ -658,7 +613,6 @@ public String toString() { sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); sb.append(" counterpartyVerificationMethod: ").append(toIndentedString(counterpartyVerificationMethod)).append("\n"); sb.append(" clearingDaysOverride: ").append(toIndentedString(clearingDaysOverride)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -720,6 +674,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AchPaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchPaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AchPaymentAllOfAttributes.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -772,23 +734,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, AchPaymentAllOfAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } elementAdapter.write(out, obj); } @@ -796,28 +741,7 @@ else if (entry.getValue() instanceof Character) public AchPaymentAllOfAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - AchPaymentAllOfAttributes instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/AchRepayment.java b/src/main/java/org/openapitools/client/model/AchRepayment.java index f406352e..2ac68189 100644 --- a/src/main/java/org/openapitools/client/model/AchRepayment.java +++ b/src/main/java/org/openapitools/client/model/AchRepayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfAttributes.java index 066f3bb0..7e9111a3 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationships.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationships.java index 208d78df..f288726c 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationships.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccount.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccount.java index eef04171..706403e7 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccount.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccountData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccountData.java index 0d8116c2..7563eba4 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccountData.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterparty.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterparty.java index c023cc13..becb563c 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterparty.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterpartyData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterpartyData.java index 5a5e8258..35767a6a 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterpartyData.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterpartyData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccount.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccount.java index ed056c8b..e0e804cb 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccount.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccountData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccountData.java index 94f02975..efaa3e37 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccountData.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomer.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomer.java index fd1b8a77..e2bb6abb 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomer.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomerData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomerData.java index 4efee9a8..ada31713 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomerData.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomerData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPayment.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPayment.java index c70fb639..8b2918b5 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPayment.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPaymentData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPaymentData.java index f4df6008..834afb65 100644 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPaymentData.java +++ b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPaymentData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Address.java b/src/main/java/org/openapitools/client/model/Address.java index 8482d9d5..2dc04d23 100644 --- a/src/main/java/org/openapitools/client/model/Address.java +++ b/src/main/java/org/openapitools/client/model/Address.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AdjustmentTransaction.java b/src/main/java/org/openapitools/client/model/AdjustmentTransaction.java index 9344db08..0ac9484e 100644 --- a/src/main/java/org/openapitools/client/model/AdjustmentTransaction.java +++ b/src/main/java/org/openapitools/client/model/AdjustmentTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AdjustmentTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AdjustmentTransactionAllOfAttributes.java index 3d78ce51..753348dc 100644 --- a/src/main/java/org/openapitools/client/model/AdjustmentTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/AdjustmentTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AnnualIncome.java b/src/main/java/org/openapitools/client/model/AnnualIncome.java index dda6a712..f3d4d911 100644 --- a/src/main/java/org/openapitools/client/model/AnnualIncome.java +++ b/src/main/java/org/openapitools/client/model/AnnualIncome.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApiToken.java b/src/main/java/org/openapitools/client/model/ApiToken.java index 333cb1e9..930467c0 100644 --- a/src/main/java/org/openapitools/client/model/ApiToken.java +++ b/src/main/java/org/openapitools/client/model/ApiToken.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -77,7 +77,7 @@ public ApiToken type(String type) { * Get type * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getType() { return type; } @@ -98,7 +98,7 @@ public ApiToken id(String id) { * Get id * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -119,7 +119,7 @@ public ApiToken attributes(ApiTokenAttributes attributes) { * Get attributes * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ApiTokenAttributes getAttributes() { return attributes; } @@ -129,50 +129,6 @@ public void setAttributes(ApiTokenAttributes attributes) { this.attributes = attributes; } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ApiToken instance itself - */ - public ApiToken putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -186,13 +142,12 @@ public boolean equals(Object o) { ApiToken apiToken = (ApiToken) o; return Objects.equals(this.type, apiToken.type) && Objects.equals(this.id, apiToken.id) && - Objects.equals(this.attributes, apiToken.attributes)&& - Objects.equals(this.additionalProperties, apiToken.additionalProperties); + Objects.equals(this.attributes, apiToken.attributes); } @Override public int hashCode() { - return Objects.hash(type, id, attributes, additionalProperties); + return Objects.hash(type, id, attributes); } @Override @@ -202,7 +157,6 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -231,9 +185,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); } /** @@ -249,19 +200,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ApiToken.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ApiToken.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiToken` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ApiTokenAttributes.validateJsonElement(jsonObj.get("attributes")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -279,23 +235,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ApiToken value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } elementAdapter.write(out, obj); } @@ -303,28 +242,7 @@ else if (entry.getValue() instanceof Character) public ApiToken read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ApiToken instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ApiTokenAttributes.java b/src/main/java/org/openapitools/client/model/ApiTokenAttributes.java index 6cf0dc37..646658ec 100644 --- a/src/main/java/org/openapitools/client/model/ApiTokenAttributes.java +++ b/src/main/java/org/openapitools/client/model/ApiTokenAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -179,50 +179,6 @@ public void setSourceIp(String sourceIp) { this.sourceIp = sourceIp; } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ApiTokenAttributes instance itself - */ - public ApiTokenAttributes putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -238,13 +194,12 @@ public boolean equals(Object o) { Objects.equals(this.description, apiTokenAttributes.description) && Objects.equals(this.expiration, apiTokenAttributes.expiration) && Objects.equals(this.token, apiTokenAttributes.token) && - Objects.equals(this.sourceIp, apiTokenAttributes.sourceIp)&& - Objects.equals(this.additionalProperties, apiTokenAttributes.additionalProperties); + Objects.equals(this.sourceIp, apiTokenAttributes.sourceIp); } @Override public int hashCode() { - return Objects.hash(createdAt, description, expiration, token, sourceIp, additionalProperties); + return Objects.hash(createdAt, description, expiration, token, sourceIp); } @Override @@ -256,7 +211,6 @@ public String toString() { sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); sb.append(" token: ").append(toIndentedString(token)).append("\n"); sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -303,6 +257,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ApiTokenAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiTokenAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ApiTokenAttributes.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -336,23 +298,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ApiTokenAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } elementAdapter.write(out, obj); } @@ -360,28 +305,7 @@ else if (entry.getValue() instanceof Character) public ApiTokenAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ApiTokenAttributes instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/Application.java b/src/main/java/org/openapitools/client/model/Application.java index b54b7b19..b775bc9a 100644 --- a/src/main/java/org/openapitools/client/model/Application.java +++ b/src/main/java/org/openapitools/client/model/Application.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationForm.java b/src/main/java/org/openapitools/client/model/ApplicationForm.java index f9838e3f..ce95edae 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationForm.java +++ b/src/main/java/org/openapitools/client/model/ApplicationForm.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -69,10 +69,6 @@ public class ApplicationForm { @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) private ApplicationFormRelationships relationships; - public static final String SERIALIZED_NAME_OFFICER_IS_BENEFICIAL_OWNER = "officerIsBeneficialOwner"; - @SerializedName(SERIALIZED_NAME_OFFICER_IS_BENEFICIAL_OWNER) - private Boolean officerIsBeneficialOwner = false; - public ApplicationForm() { } @@ -160,27 +156,6 @@ public void setRelationships(ApplicationFormRelationships relationships) { } - public ApplicationForm officerIsBeneficialOwner(Boolean officerIsBeneficialOwner) { - - this.officerIsBeneficialOwner = officerIsBeneficialOwner; - return this; - } - - /** - * Get officerIsBeneficialOwner - * @return officerIsBeneficialOwner - **/ - @javax.annotation.Nullable - public Boolean getOfficerIsBeneficialOwner() { - return officerIsBeneficialOwner; - } - - - public void setOfficerIsBeneficialOwner(Boolean officerIsBeneficialOwner) { - this.officerIsBeneficialOwner = officerIsBeneficialOwner; - } - - @Override public boolean equals(Object o) { @@ -194,13 +169,12 @@ public boolean equals(Object o) { return Objects.equals(this.type, applicationForm.type) && Objects.equals(this.id, applicationForm.id) && Objects.equals(this.attributes, applicationForm.attributes) && - Objects.equals(this.relationships, applicationForm.relationships) && - Objects.equals(this.officerIsBeneficialOwner, applicationForm.officerIsBeneficialOwner); + Objects.equals(this.relationships, applicationForm.relationships); } @Override public int hashCode() { - return Objects.hash(type, id, attributes, relationships, officerIsBeneficialOwner); + return Objects.hash(type, id, attributes, relationships); } @Override @@ -211,7 +185,6 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append(" officerIsBeneficialOwner: ").append(toIndentedString(officerIsBeneficialOwner)).append("\n"); sb.append("}"); return sb.toString(); } @@ -238,7 +211,6 @@ private String toIndentedString(Object o) { openapiFields.add("id"); openapiFields.add("attributes"); openapiFields.add("relationships"); - openapiFields.add("officerIsBeneficialOwner"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormAdditionalDisclosuresInner.java b/src/main/java/org/openapitools/client/model/ApplicationFormAdditionalDisclosuresInner.java index 5df9c4ff..2c5392ba 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationFormAdditionalDisclosuresInner.java +++ b/src/main/java/org/openapitools/client/model/ApplicationFormAdditionalDisclosuresInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormAttributes.java b/src/main/java/org/openapitools/client/model/ApplicationFormAttributes.java index 4bdb7b1a..b10f6df3 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationFormAttributes.java +++ b/src/main/java/org/openapitools/client/model/ApplicationFormAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,8 +23,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.client.model.Prefilled; -import org.openapitools.client.model.SettingsOverride; +import org.openapitools.client.model.ApplicationFormPrefill; +import org.openapitools.client.model.ApplicationFormSettingsOverride; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -63,17 +63,88 @@ public class ApplicationFormAttributes { @SerializedName(SERIALIZED_NAME_URL) private String url; + /** + * Gets or Sets stage + */ + @JsonAdapter(StageEnum.Adapter.class) + public enum StageEnum { + CHOOSEBUSINESSORINDIVIDUAL("ChooseBusinessOrIndividual"), + + ENTERINDIVIDUALINFORMATION("EnterIndividualInformation"), + + INDIVIDUALPHONEVERIFICATION("IndividualPhoneVerification"), + + INDIVIDUALAPPLICATIONCREATED("IndividualApplicationCreated"), + + ENTERBUSINESSINFORMATION("EnterBusinessInformation"), + + ENTERBUSINESSADDITIONALINFORMATION("EnterBusinessAdditionalInformation"), + + ENTEROFFICERINFORMATION("EnterOfficerInformation"), + + BUSINESSPHONEVERIFICATION("BusinessPhoneVerification"), + + ENTERBENEFICIALOWNERSINFORMATION("EnterBeneficialOwnersInformation"), + + BUSINESSAPPLICATIONCREATED("BusinessApplicationCreated"), + + ENTERSOLEPROPRIETORSHIPINFORMATION("EnterSoleProprietorshipInformation"), + + ENTERSOLEPROPRIETORSHIPBUSINESSINFORMATION("EnterSoleProprietorshipBusinessInformation"), + + SOLEPROPRIETORSHIPPHONEVERIFICATION("SoleProprietorshipPhoneVerification"), + + SOLEPROPRIETORSHIPAPPLICATIONCREATED("SoleProprietorshipApplicationCreated"); + + private String value; + + StageEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StageEnum fromValue(String value) { + for (StageEnum b : StageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StageEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StageEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StageEnum.fromValue(value); + } + } + } + public static final String SERIALIZED_NAME_STAGE = "stage"; @SerializedName(SERIALIZED_NAME_STAGE) - private String stage; + private StageEnum stage; public static final String SERIALIZED_NAME_APPLICANT_DETAILS = "applicantDetails"; @SerializedName(SERIALIZED_NAME_APPLICANT_DETAILS) - private Prefilled applicantDetails; + private ApplicationFormPrefill applicantDetails; public static final String SERIALIZED_NAME_SETTINGS_OVERRIDE = "settingsOverride"; @SerializedName(SERIALIZED_NAME_SETTINGS_OVERRIDE) - private SettingsOverride settingsOverride; + private ApplicationFormSettingsOverride settingsOverride; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) @@ -177,7 +248,7 @@ public void setUrl(String url) { } - public ApplicationFormAttributes stage(String stage) { + public ApplicationFormAttributes stage(StageEnum stage) { this.stage = stage; return this; @@ -188,17 +259,17 @@ public ApplicationFormAttributes stage(String stage) { * @return stage **/ @javax.annotation.Nullable - public String getStage() { + public StageEnum getStage() { return stage; } - public void setStage(String stage) { + public void setStage(StageEnum stage) { this.stage = stage; } - public ApplicationFormAttributes applicantDetails(Prefilled applicantDetails) { + public ApplicationFormAttributes applicantDetails(ApplicationFormPrefill applicantDetails) { this.applicantDetails = applicantDetails; return this; @@ -209,17 +280,17 @@ public ApplicationFormAttributes applicantDetails(Prefilled applicantDetails) { * @return applicantDetails **/ @javax.annotation.Nullable - public Prefilled getApplicantDetails() { + public ApplicationFormPrefill getApplicantDetails() { return applicantDetails; } - public void setApplicantDetails(Prefilled applicantDetails) { + public void setApplicantDetails(ApplicationFormPrefill applicantDetails) { this.applicantDetails = applicantDetails; } - public ApplicationFormAttributes settingsOverride(SettingsOverride settingsOverride) { + public ApplicationFormAttributes settingsOverride(ApplicationFormSettingsOverride settingsOverride) { this.settingsOverride = settingsOverride; return this; @@ -230,12 +301,12 @@ public ApplicationFormAttributes settingsOverride(SettingsOverride settingsOverr * @return settingsOverride **/ @javax.annotation.Nullable - public SettingsOverride getSettingsOverride() { + public ApplicationFormSettingsOverride getSettingsOverride() { return settingsOverride; } - public void setSettingsOverride(SettingsOverride settingsOverride) { + public void setSettingsOverride(ApplicationFormSettingsOverride settingsOverride) { this.settingsOverride = settingsOverride; } @@ -399,11 +470,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `applicantDetails` if (jsonObj.get("applicantDetails") != null && !jsonObj.get("applicantDetails").isJsonNull()) { - Prefilled.validateJsonElement(jsonObj.get("applicantDetails")); + ApplicationFormPrefill.validateJsonElement(jsonObj.get("applicantDetails")); } // validate the optional field `settingsOverride` if (jsonObj.get("settingsOverride") != null && !jsonObj.get("settingsOverride").isJsonNull()) { - SettingsOverride.validateJsonElement(jsonObj.get("settingsOverride")); + ApplicationFormSettingsOverride.validateJsonElement(jsonObj.get("settingsOverride")); } // ensure the optional json data is an array if present if (jsonObj.get("allowedApplicationTypes") != null && !jsonObj.get("allowedApplicationTypes").isJsonNull() && !jsonObj.get("allowedApplicationTypes").isJsonArray()) { diff --git a/src/main/java/org/openapitools/client/model/Prefilled.java b/src/main/java/org/openapitools/client/model/ApplicationFormPrefill.java similarity index 83% rename from src/main/java/org/openapitools/client/model/Prefilled.java rename to src/main/java/org/openapitools/client/model/ApplicationFormPrefill.java index 776638e2..fb4d1413 100644 --- a/src/main/java/org/openapitools/client/model/Prefilled.java +++ b/src/main/java/org/openapitools/client/model/ApplicationFormPrefill.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -59,10 +59,10 @@ import org.openapitools.client.JSON; /** - * Prefilled + * ApplicationFormPrefill */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Prefilled { +public class ApplicationFormPrefill { /** * Gets or Sets applicationType */ @@ -192,10 +192,10 @@ public ApplicationTypeEnum read(final JsonReader jsonReader) throws IOException @SerializedName(SERIALIZED_NAME_INDUSTRY) private Industry industry; - public Prefilled() { + public ApplicationFormPrefill() { } - public Prefilled applicationType(ApplicationTypeEnum applicationType) { + public ApplicationFormPrefill applicationType(ApplicationTypeEnum applicationType) { this.applicationType = applicationType; return this; @@ -216,7 +216,7 @@ public void setApplicationType(ApplicationTypeEnum applicationType) { } - public Prefilled fullName(FullName fullName) { + public ApplicationFormPrefill fullName(FullName fullName) { this.fullName = fullName; return this; @@ -237,7 +237,7 @@ public void setFullName(FullName fullName) { } - public Prefilled ssn(String ssn) { + public ApplicationFormPrefill ssn(String ssn) { this.ssn = ssn; return this; @@ -258,7 +258,7 @@ public void setSsn(String ssn) { } - public Prefilled passport(String passport) { + public ApplicationFormPrefill passport(String passport) { this.passport = passport; return this; @@ -279,7 +279,7 @@ public void setPassport(String passport) { } - public Prefilled nationality(String nationality) { + public ApplicationFormPrefill nationality(String nationality) { this.nationality = nationality; return this; @@ -300,7 +300,7 @@ public void setNationality(String nationality) { } - public Prefilled dateOfBirth(LocalDate dateOfBirth) { + public ApplicationFormPrefill dateOfBirth(LocalDate dateOfBirth) { this.dateOfBirth = dateOfBirth; return this; @@ -321,7 +321,7 @@ public void setDateOfBirth(LocalDate dateOfBirth) { } - public Prefilled email(String email) { + public ApplicationFormPrefill email(String email) { this.email = email; return this; @@ -342,7 +342,7 @@ public void setEmail(String email) { } - public Prefilled name(String name) { + public ApplicationFormPrefill name(String name) { this.name = name; return this; @@ -363,7 +363,7 @@ public void setName(String name) { } - public Prefilled stateOfIncorporation(String stateOfIncorporation) { + public ApplicationFormPrefill stateOfIncorporation(String stateOfIncorporation) { this.stateOfIncorporation = stateOfIncorporation; return this; @@ -384,7 +384,7 @@ public void setStateOfIncorporation(String stateOfIncorporation) { } - public Prefilled entityType(EntityType entityType) { + public ApplicationFormPrefill entityType(EntityType entityType) { this.entityType = entityType; return this; @@ -405,7 +405,7 @@ public void setEntityType(EntityType entityType) { } - public Prefilled contact(Contact contact) { + public ApplicationFormPrefill contact(Contact contact) { this.contact = contact; return this; @@ -426,7 +426,7 @@ public void setContact(Contact contact) { } - public Prefilled officer(CreateOfficer officer) { + public ApplicationFormPrefill officer(CreateOfficer officer) { this.officer = officer; return this; @@ -447,13 +447,13 @@ public void setOfficer(CreateOfficer officer) { } - public Prefilled beneficialOwners(List beneficialOwners) { + public ApplicationFormPrefill beneficialOwners(List beneficialOwners) { this.beneficialOwners = beneficialOwners; return this; } - public Prefilled addBeneficialOwnersItem(CreateBeneficialOwner beneficialOwnersItem) { + public ApplicationFormPrefill addBeneficialOwnersItem(CreateBeneficialOwner beneficialOwnersItem) { if (this.beneficialOwners == null) { this.beneficialOwners = new ArrayList<>(); } @@ -476,7 +476,7 @@ public void setBeneficialOwners(List beneficialOwners) { } - public Prefilled website(String website) { + public ApplicationFormPrefill website(String website) { this.website = website; return this; @@ -497,7 +497,7 @@ public void setWebsite(String website) { } - public Prefilled phone(Phone phone) { + public ApplicationFormPrefill phone(Phone phone) { this.phone = phone; return this; @@ -518,7 +518,7 @@ public void setPhone(Phone phone) { } - public Prefilled address(Address address) { + public ApplicationFormPrefill address(Address address) { this.address = address; return this; @@ -539,7 +539,7 @@ public void setAddress(Address address) { } - public Prefilled dba(String dba) { + public ApplicationFormPrefill dba(String dba) { this.dba = dba; return this; @@ -560,7 +560,7 @@ public void setDba(String dba) { } - public Prefilled ein(String ein) { + public ApplicationFormPrefill ein(String ein) { this.ein = ein; return this; @@ -581,7 +581,7 @@ public void setEin(String ein) { } - public Prefilled jwtSubject(String jwtSubject) { + public ApplicationFormPrefill jwtSubject(String jwtSubject) { this.jwtSubject = jwtSubject; return this; @@ -602,7 +602,7 @@ public void setJwtSubject(String jwtSubject) { } - public Prefilled industry(Industry industry) { + public ApplicationFormPrefill industry(Industry industry) { this.industry = industry; return this; @@ -632,27 +632,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Prefilled prefilled = (Prefilled) o; - return Objects.equals(this.applicationType, prefilled.applicationType) && - Objects.equals(this.fullName, prefilled.fullName) && - Objects.equals(this.ssn, prefilled.ssn) && - Objects.equals(this.passport, prefilled.passport) && - Objects.equals(this.nationality, prefilled.nationality) && - Objects.equals(this.dateOfBirth, prefilled.dateOfBirth) && - Objects.equals(this.email, prefilled.email) && - Objects.equals(this.name, prefilled.name) && - Objects.equals(this.stateOfIncorporation, prefilled.stateOfIncorporation) && - Objects.equals(this.entityType, prefilled.entityType) && - Objects.equals(this.contact, prefilled.contact) && - Objects.equals(this.officer, prefilled.officer) && - Objects.equals(this.beneficialOwners, prefilled.beneficialOwners) && - Objects.equals(this.website, prefilled.website) && - Objects.equals(this.phone, prefilled.phone) && - Objects.equals(this.address, prefilled.address) && - Objects.equals(this.dba, prefilled.dba) && - Objects.equals(this.ein, prefilled.ein) && - Objects.equals(this.jwtSubject, prefilled.jwtSubject) && - Objects.equals(this.industry, prefilled.industry); + ApplicationFormPrefill applicationFormPrefill = (ApplicationFormPrefill) o; + return Objects.equals(this.applicationType, applicationFormPrefill.applicationType) && + Objects.equals(this.fullName, applicationFormPrefill.fullName) && + Objects.equals(this.ssn, applicationFormPrefill.ssn) && + Objects.equals(this.passport, applicationFormPrefill.passport) && + Objects.equals(this.nationality, applicationFormPrefill.nationality) && + Objects.equals(this.dateOfBirth, applicationFormPrefill.dateOfBirth) && + Objects.equals(this.email, applicationFormPrefill.email) && + Objects.equals(this.name, applicationFormPrefill.name) && + Objects.equals(this.stateOfIncorporation, applicationFormPrefill.stateOfIncorporation) && + Objects.equals(this.entityType, applicationFormPrefill.entityType) && + Objects.equals(this.contact, applicationFormPrefill.contact) && + Objects.equals(this.officer, applicationFormPrefill.officer) && + Objects.equals(this.beneficialOwners, applicationFormPrefill.beneficialOwners) && + Objects.equals(this.website, applicationFormPrefill.website) && + Objects.equals(this.phone, applicationFormPrefill.phone) && + Objects.equals(this.address, applicationFormPrefill.address) && + Objects.equals(this.dba, applicationFormPrefill.dba) && + Objects.equals(this.ein, applicationFormPrefill.ein) && + Objects.equals(this.jwtSubject, applicationFormPrefill.jwtSubject) && + Objects.equals(this.industry, applicationFormPrefill.industry); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -674,7 +674,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Prefilled {\n"); + sb.append("class ApplicationFormPrefill {\n"); sb.append(" applicationType: ").append(toIndentedString(applicationType)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); @@ -746,20 +746,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Prefilled + * @throws IOException if the JSON Element is invalid with respect to ApplicationFormPrefill */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!Prefilled.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Prefilled is not found in the empty JSON string", Prefilled.openapiRequiredFields.toString())); + if (!ApplicationFormPrefill.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationFormPrefill is not found in the empty JSON string", ApplicationFormPrefill.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!Prefilled.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Prefilled` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!ApplicationFormPrefill.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationFormPrefill` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -836,22 +836,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Prefilled.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Prefilled' and its subtypes + if (!ApplicationFormPrefill.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApplicationFormPrefill' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Prefilled.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApplicationFormPrefill.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Prefilled value) throws IOException { + public void write(JsonWriter out, ApplicationFormPrefill value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public Prefilled read(JsonReader in) throws IOException { + public ApplicationFormPrefill read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -862,18 +862,18 @@ public Prefilled read(JsonReader in) throws IOException { } /** - * Create an instance of Prefilled given an JSON string + * Create an instance of ApplicationFormPrefill given an JSON string * * @param jsonString JSON string - * @return An instance of Prefilled - * @throws IOException if the JSON string is invalid with respect to Prefilled + * @return An instance of ApplicationFormPrefill + * @throws IOException if the JSON string is invalid with respect to ApplicationFormPrefill */ - public static Prefilled fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Prefilled.class); + public static ApplicationFormPrefill fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApplicationFormPrefill.class); } /** - * Convert an instance of Prefilled to an JSON string + * Convert an instance of ApplicationFormPrefill to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormRelationships.java b/src/main/java/org/openapitools/client/model/ApplicationFormRelationships.java index 65ac200f..4e2d5f51 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationFormRelationships.java +++ b/src/main/java/org/openapitools/client/model/ApplicationFormRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplication.java b/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplication.java index e6155a12..91e8a2ef 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplication.java +++ b/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplicationData.java b/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplicationData.java index 6f306210..1156882d 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplicationData.java +++ b/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplicationData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/SettingsOverride.java b/src/main/java/org/openapitools/client/model/ApplicationFormSettingsOverride.java similarity index 78% rename from src/main/java/org/openapitools/client/model/SettingsOverride.java rename to src/main/java/org/openapitools/client/model/ApplicationFormSettingsOverride.java index 5580f36f..b9971ff7 100644 --- a/src/main/java/org/openapitools/client/model/SettingsOverride.java +++ b/src/main/java/org/openapitools/client/model/ApplicationFormSettingsOverride.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,10 +50,10 @@ import org.openapitools.client.JSON; /** - * SettingsOverride + * ApplicationFormSettingsOverride */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SettingsOverride { +public class ApplicationFormSettingsOverride { public static final String SERIALIZED_NAME_REDIRECT_URL = "redirectUrl"; @SerializedName(SERIALIZED_NAME_REDIRECT_URL) private String redirectUrl; @@ -90,14 +90,10 @@ public class SettingsOverride { @SerializedName(SERIALIZED_NAME_ADDITIONAL_DISCLOSURES) private List additionalDisclosures; - public static final String SERIALIZED_NAME_VALIDATE_PHONE_NUMBER = "validatePhoneNumber"; - @SerializedName(SERIALIZED_NAME_VALIDATE_PHONE_NUMBER) - private Boolean validatePhoneNumber = true; - - public SettingsOverride() { + public ApplicationFormSettingsOverride() { } - public SettingsOverride redirectUrl(String redirectUrl) { + public ApplicationFormSettingsOverride redirectUrl(String redirectUrl) { this.redirectUrl = redirectUrl; return this; @@ -118,7 +114,7 @@ public void setRedirectUrl(String redirectUrl) { } - public SettingsOverride privacyPolicyUrl(String privacyPolicyUrl) { + public ApplicationFormSettingsOverride privacyPolicyUrl(String privacyPolicyUrl) { this.privacyPolicyUrl = privacyPolicyUrl; return this; @@ -139,7 +135,7 @@ public void setPrivacyPolicyUrl(String privacyPolicyUrl) { } - public SettingsOverride electronicDisclosuresUrl(String electronicDisclosuresUrl) { + public ApplicationFormSettingsOverride electronicDisclosuresUrl(String electronicDisclosuresUrl) { this.electronicDisclosuresUrl = electronicDisclosuresUrl; return this; @@ -160,7 +156,7 @@ public void setElectronicDisclosuresUrl(String electronicDisclosuresUrl) { } - public SettingsOverride depositTermsUrl(String depositTermsUrl) { + public ApplicationFormSettingsOverride depositTermsUrl(String depositTermsUrl) { this.depositTermsUrl = depositTermsUrl; return this; @@ -181,7 +177,7 @@ public void setDepositTermsUrl(String depositTermsUrl) { } - public SettingsOverride clientTermsUrl(String clientTermsUrl) { + public ApplicationFormSettingsOverride clientTermsUrl(String clientTermsUrl) { this.clientTermsUrl = clientTermsUrl; return this; @@ -202,7 +198,7 @@ public void setClientTermsUrl(String clientTermsUrl) { } - public SettingsOverride cardholderTermsUrl(String cardholderTermsUrl) { + public ApplicationFormSettingsOverride cardholderTermsUrl(String cardholderTermsUrl) { this.cardholderTermsUrl = cardholderTermsUrl; return this; @@ -223,7 +219,7 @@ public void setCardholderTermsUrl(String cardholderTermsUrl) { } - public SettingsOverride cashAdvancedTermsUrl(String cashAdvancedTermsUrl) { + public ApplicationFormSettingsOverride cashAdvancedTermsUrl(String cashAdvancedTermsUrl) { this.cashAdvancedTermsUrl = cashAdvancedTermsUrl; return this; @@ -244,7 +240,7 @@ public void setCashAdvancedTermsUrl(String cashAdvancedTermsUrl) { } - public SettingsOverride debitCardDisclosureUrl(String debitCardDisclosureUrl) { + public ApplicationFormSettingsOverride debitCardDisclosureUrl(String debitCardDisclosureUrl) { this.debitCardDisclosureUrl = debitCardDisclosureUrl; return this; @@ -265,13 +261,13 @@ public void setDebitCardDisclosureUrl(String debitCardDisclosureUrl) { } - public SettingsOverride additionalDisclosures(List additionalDisclosures) { + public ApplicationFormSettingsOverride additionalDisclosures(List additionalDisclosures) { this.additionalDisclosures = additionalDisclosures; return this; } - public SettingsOverride addAdditionalDisclosuresItem(ApplicationFormAdditionalDisclosuresInner additionalDisclosuresItem) { + public ApplicationFormSettingsOverride addAdditionalDisclosuresItem(ApplicationFormAdditionalDisclosuresInner additionalDisclosuresItem) { if (this.additionalDisclosures == null) { this.additionalDisclosures = new ArrayList<>(); } @@ -294,27 +290,6 @@ public void setAdditionalDisclosures(List(); @@ -397,20 +369,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SettingsOverride + * @throws IOException if the JSON Element is invalid with respect to ApplicationFormSettingsOverride */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!SettingsOverride.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SettingsOverride is not found in the empty JSON string", SettingsOverride.openapiRequiredFields.toString())); + if (!ApplicationFormSettingsOverride.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationFormSettingsOverride is not found in the empty JSON string", ApplicationFormSettingsOverride.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!SettingsOverride.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SettingsOverride` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!ApplicationFormSettingsOverride.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationFormSettingsOverride` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -458,22 +430,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!SettingsOverride.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SettingsOverride' and its subtypes + if (!ApplicationFormSettingsOverride.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApplicationFormSettingsOverride' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SettingsOverride.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApplicationFormSettingsOverride.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, SettingsOverride value) throws IOException { + public void write(JsonWriter out, ApplicationFormSettingsOverride value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public SettingsOverride read(JsonReader in) throws IOException { + public ApplicationFormSettingsOverride read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -484,18 +456,18 @@ public SettingsOverride read(JsonReader in) throws IOException { } /** - * Create an instance of SettingsOverride given an JSON string + * Create an instance of ApplicationFormSettingsOverride given an JSON string * * @param jsonString JSON string - * @return An instance of SettingsOverride - * @throws IOException if the JSON string is invalid with respect to SettingsOverride + * @return An instance of ApplicationFormSettingsOverride + * @throws IOException if the JSON string is invalid with respect to ApplicationFormSettingsOverride */ - public static SettingsOverride fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SettingsOverride.class); + public static ApplicationFormSettingsOverride fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApplicationFormSettingsOverride.class); } /** - * Convert an instance of SettingsOverride to an JSON string + * Convert an instance of ApplicationFormSettingsOverride to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationships.java b/src/main/java/org/openapitools/client/model/ApplicationRelationships.java index 6d2fafd9..ddf8e67d 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationships.java +++ b/src/main/java/org/openapitools/client/model/ApplicationRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwners.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwners.java index cb0a2b19..303cc80b 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwners.java +++ b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwners.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwnersDataInner.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwnersDataInner.java index 069c384b..572067c8 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwnersDataInner.java +++ b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwnersDataInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiaries.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiaries.java index 920141fe..57ef9885 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiaries.java +++ b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiaries.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiariesDataInner.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiariesDataInner.java index 913109f6..50e5b04a 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiariesDataInner.java +++ b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiariesDataInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrustees.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrustees.java index bc2dda79..e8a20a84 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrustees.java +++ b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrustees.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrusteesDataInner.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrusteesDataInner.java index 462d1915..f5f8f1fb 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrusteesDataInner.java +++ b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrusteesDataInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApplicationStatus.java b/src/main/java/org/openapitools/client/model/ApplicationStatus.java index 12d43d6e..d7d18091 100644 --- a/src/main/java/org/openapitools/client/model/ApplicationStatus.java +++ b/src/main/java/org/openapitools/client/model/ApplicationStatus.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequest.java index 845016de..6184a7d1 100644 --- a/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequest.java +++ b/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.ApproveAuthorizationRequestAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,56 +51,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApproveAuthorizationRequest { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "approveAuthorizationRequest"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ApproveAuthorizationRequestAttributes attributes; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ApproveAuthorizationRequest data; public ApproveAuthorizationRequest() { } - public ApproveAuthorizationRequest type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ApproveAuthorizationRequest attributes(ApproveAuthorizationRequestAttributes attributes) { + public ApproveAuthorizationRequest data(ApproveAuthorizationRequest data) { - this.attributes = attributes; + this.data = data; return this; } /** - * Get attributes - * @return attributes + * Get data + * @return data **/ - @javax.annotation.Nonnull - public ApproveAuthorizationRequestAttributes getAttributes() { - return attributes; + @javax.annotation.Nullable + public ApproveAuthorizationRequest getData() { + return data; } - public void setAttributes(ApproveAuthorizationRequestAttributes attributes) { - this.attributes = attributes; + public void setData(ApproveAuthorizationRequest data) { + this.data = data; } @@ -115,21 +89,19 @@ public boolean equals(Object o) { return false; } ApproveAuthorizationRequest approveAuthorizationRequest = (ApproveAuthorizationRequest) o; - return Objects.equals(this.type, approveAuthorizationRequest.type) && - Objects.equals(this.attributes, approveAuthorizationRequest.attributes); + return Objects.equals(this.data, approveAuthorizationRequest.data); } @Override public int hashCode() { - return Objects.hash(type, attributes); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApproveAuthorizationRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -152,13 +124,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); } /** @@ -181,19 +150,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApproveAuthorizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ApproveAuthorizationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ApproveAuthorizationRequest.validateJsonElement(jsonObj.get("data")); } - // validate the required field `attributes` - ApproveAuthorizationRequestAttributes.validateJsonElement(jsonObj.get("attributes")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequestAttributes.java b/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequestAttributes.java index fc12ba94..51129699 100644 --- a/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequestAttributes.java +++ b/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequestAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest15.java b/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequest.java similarity index 67% rename from src/main/java/org/openapitools/client/model/ExecuteRequest15.java rename to src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequest.java index 985a8e0d..078eb9d3 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest15.java +++ b/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateApiToken; +import org.openapitools.client.model.ApproveCheckPaymentRequestData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,18 +48,18 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest15 + * ApproveCheckPaymentRequest */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest15 { +public class ApproveCheckPaymentRequest { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private CreateApiToken data; + private ApproveCheckPaymentRequestData data; - public ExecuteRequest15() { + public ApproveCheckPaymentRequest() { } - public ExecuteRequest15 data(CreateApiToken data) { + public ApproveCheckPaymentRequest data(ApproveCheckPaymentRequestData data) { this.data = data; return this; @@ -70,12 +70,12 @@ public ExecuteRequest15 data(CreateApiToken data) { * @return data **/ @javax.annotation.Nullable - public CreateApiToken getData() { + public ApproveCheckPaymentRequestData getData() { return data; } - public void setData(CreateApiToken data) { + public void setData(ApproveCheckPaymentRequestData data) { this.data = data; } @@ -89,8 +89,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest15 executeRequest15 = (ExecuteRequest15) o; - return Objects.equals(this.data, executeRequest15.data); + ApproveCheckPaymentRequest approveCheckPaymentRequest = (ApproveCheckPaymentRequest) o; + return Objects.equals(this.data, approveCheckPaymentRequest.data); } @Override @@ -101,7 +101,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest15 {\n"); + sb.append("class ApproveCheckPaymentRequest {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -135,26 +135,26 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest15 + * @throws IOException if the JSON Element is invalid with respect to ApproveCheckPaymentRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest15.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest15 is not found in the empty JSON string", ExecuteRequest15.openapiRequiredFields.toString())); + if (!ApproveCheckPaymentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApproveCheckPaymentRequest is not found in the empty JSON string", ApproveCheckPaymentRequest.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest15.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest15` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!ApproveCheckPaymentRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApproveCheckPaymentRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `data` if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateApiToken.validateJsonElement(jsonObj.get("data")); + ApproveCheckPaymentRequestData.validateJsonElement(jsonObj.get("data")); } } @@ -162,22 +162,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest15.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest15' and its subtypes + if (!ApproveCheckPaymentRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApproveCheckPaymentRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest15.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApproveCheckPaymentRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest15 value) throws IOException { + public void write(JsonWriter out, ApproveCheckPaymentRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest15 read(JsonReader in) throws IOException { + public ApproveCheckPaymentRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -188,18 +188,18 @@ public ExecuteRequest15 read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest15 given an JSON string + * Create an instance of ApproveCheckPaymentRequest given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest15 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest15 + * @return An instance of ApproveCheckPaymentRequest + * @throws IOException if the JSON string is invalid with respect to ApproveCheckPaymentRequest */ - public static ExecuteRequest15 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest15.class); + public static ApproveCheckPaymentRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApproveCheckPaymentRequest.class); } /** - * Convert an instance of ExecuteRequest15 to an JSON string + * Convert an instance of ApproveCheckPaymentRequest to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest20Data.java b/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequestData.java similarity index 70% rename from src/main/java/org/openapitools/client/model/ExecuteRequest20Data.java rename to src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequestData.java index c22749ad..0aeedc7b 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest20Data.java +++ b/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequestData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,18 +47,18 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest20Data + * ApproveCheckPaymentRequestData */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest20Data { +public class ApproveCheckPaymentRequestData { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) private String type = "additionalVerification"; - public ExecuteRequest20Data() { + public ApproveCheckPaymentRequestData() { } - public ExecuteRequest20Data type(String type) { + public ApproveCheckPaymentRequestData type(String type) { this.type = type; return this; @@ -88,8 +88,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest20Data executeRequest20Data = (ExecuteRequest20Data) o; - return Objects.equals(this.type, executeRequest20Data.type); + ApproveCheckPaymentRequestData approveCheckPaymentRequestData = (ApproveCheckPaymentRequestData) o; + return Objects.equals(this.type, approveCheckPaymentRequestData.type); } @Override @@ -100,7 +100,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest20Data {\n"); + sb.append("class ApproveCheckPaymentRequestData {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); @@ -134,20 +134,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest20Data + * @throws IOException if the JSON Element is invalid with respect to ApproveCheckPaymentRequestData */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest20Data.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest20Data is not found in the empty JSON string", ExecuteRequest20Data.openapiRequiredFields.toString())); + if (!ApproveCheckPaymentRequestData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApproveCheckPaymentRequestData is not found in the empty JSON string", ApproveCheckPaymentRequestData.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest20Data.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest20Data` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!ApproveCheckPaymentRequestData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApproveCheckPaymentRequestData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -160,22 +160,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest20Data.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest20Data' and its subtypes + if (!ApproveCheckPaymentRequestData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApproveCheckPaymentRequestData' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest20Data.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApproveCheckPaymentRequestData.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest20Data value) throws IOException { + public void write(JsonWriter out, ApproveCheckPaymentRequestData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest20Data read(JsonReader in) throws IOException { + public ApproveCheckPaymentRequestData read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -186,18 +186,18 @@ public ExecuteRequest20Data read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest20Data given an JSON string + * Create an instance of ApproveCheckPaymentRequestData given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest20Data - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest20Data + * @return An instance of ApproveCheckPaymentRequestData + * @throws IOException if the JSON string is invalid with respect to ApproveCheckPaymentRequestData */ - public static ExecuteRequest20Data fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest20Data.class); + public static ApproveCheckPaymentRequestData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApproveCheckPaymentRequestData.class); } /** - * Convert an instance of ExecuteRequest20Data to an JSON string + * Convert an instance of ApproveCheckPaymentRequestData to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest5.java b/src/main/java/org/openapitools/client/model/ArchiveCustomerRequest.java similarity index 73% rename from src/main/java/org/openapitools/client/model/ExecuteRequest5.java rename to src/main/java/org/openapitools/client/model/ArchiveCustomerRequest.java index 72805e87..ea5c35e8 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest5.java +++ b/src/main/java/org/openapitools/client/model/ArchiveCustomerRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.ExecuteRequest5Attributes; +import org.openapitools.client.model.ArchiveCustomerRequestAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,10 +48,10 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest5 + * ArchiveCustomerRequest */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest5 { +public class ArchiveCustomerRequest { /** * Gets or Sets type */ @@ -103,12 +103,12 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ExecuteRequest5Attributes attributes; + private ArchiveCustomerRequestAttributes attributes; - public ExecuteRequest5() { + public ArchiveCustomerRequest() { } - public ExecuteRequest5 type(TypeEnum type) { + public ArchiveCustomerRequest type(TypeEnum type) { this.type = type; return this; @@ -129,7 +129,7 @@ public void setType(TypeEnum type) { } - public ExecuteRequest5 attributes(ExecuteRequest5Attributes attributes) { + public ArchiveCustomerRequest attributes(ArchiveCustomerRequestAttributes attributes) { this.attributes = attributes; return this; @@ -140,12 +140,12 @@ public ExecuteRequest5 attributes(ExecuteRequest5Attributes attributes) { * @return attributes **/ @javax.annotation.Nullable - public ExecuteRequest5Attributes getAttributes() { + public ArchiveCustomerRequestAttributes getAttributes() { return attributes; } - public void setAttributes(ExecuteRequest5Attributes attributes) { + public void setAttributes(ArchiveCustomerRequestAttributes attributes) { this.attributes = attributes; } @@ -159,9 +159,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest5 executeRequest5 = (ExecuteRequest5) o; - return Objects.equals(this.type, executeRequest5.type) && - Objects.equals(this.attributes, executeRequest5.attributes); + ArchiveCustomerRequest archiveCustomerRequest = (ArchiveCustomerRequest) o; + return Objects.equals(this.type, archiveCustomerRequest.type) && + Objects.equals(this.attributes, archiveCustomerRequest.attributes); } @Override @@ -172,7 +172,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest5 {\n"); + sb.append("class ArchiveCustomerRequest {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append("}"); @@ -208,20 +208,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest5 + * @throws IOException if the JSON Element is invalid with respect to ArchiveCustomerRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest5.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest5 is not found in the empty JSON string", ExecuteRequest5.openapiRequiredFields.toString())); + if (!ArchiveCustomerRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ArchiveCustomerRequest is not found in the empty JSON string", ArchiveCustomerRequest.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest5.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest5` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!ArchiveCustomerRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArchiveCustomerRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -230,7 +230,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `attributes` if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - ExecuteRequest5Attributes.validateJsonElement(jsonObj.get("attributes")); + ArchiveCustomerRequestAttributes.validateJsonElement(jsonObj.get("attributes")); } } @@ -238,22 +238,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest5.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest5' and its subtypes + if (!ArchiveCustomerRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ArchiveCustomerRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest5.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ArchiveCustomerRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest5 value) throws IOException { + public void write(JsonWriter out, ArchiveCustomerRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest5 read(JsonReader in) throws IOException { + public ArchiveCustomerRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -264,18 +264,18 @@ public ExecuteRequest5 read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest5 given an JSON string + * Create an instance of ArchiveCustomerRequest given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest5 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest5 + * @return An instance of ArchiveCustomerRequest + * @throws IOException if the JSON string is invalid with respect to ArchiveCustomerRequest */ - public static ExecuteRequest5 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest5.class); + public static ArchiveCustomerRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ArchiveCustomerRequest.class); } /** - * Convert an instance of ExecuteRequest5 to an JSON string + * Convert an instance of ArchiveCustomerRequest to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest5Attributes.java b/src/main/java/org/openapitools/client/model/ArchiveCustomerRequestAttributes.java similarity index 75% rename from src/main/java/org/openapitools/client/model/ExecuteRequest5Attributes.java rename to src/main/java/org/openapitools/client/model/ArchiveCustomerRequestAttributes.java index 22d1cfb2..3f3dc244 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest5Attributes.java +++ b/src/main/java/org/openapitools/client/model/ArchiveCustomerRequestAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,10 +47,10 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest5Attributes + * ArchiveCustomerRequestAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest5Attributes { +public class ArchiveCustomerRequestAttributes { /** * Gets or Sets reason */ @@ -114,10 +114,10 @@ public ReasonEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_REASON) private ReasonEnum reason; - public ExecuteRequest5Attributes() { + public ArchiveCustomerRequestAttributes() { } - public ExecuteRequest5Attributes reason(ReasonEnum reason) { + public ArchiveCustomerRequestAttributes reason(ReasonEnum reason) { this.reason = reason; return this; @@ -147,8 +147,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest5Attributes executeRequest5Attributes = (ExecuteRequest5Attributes) o; - return Objects.equals(this.reason, executeRequest5Attributes.reason); + ArchiveCustomerRequestAttributes archiveCustomerRequestAttributes = (ArchiveCustomerRequestAttributes) o; + return Objects.equals(this.reason, archiveCustomerRequestAttributes.reason); } @Override @@ -159,7 +159,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest5Attributes {\n"); + sb.append("class ArchiveCustomerRequestAttributes {\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append("}"); return sb.toString(); @@ -193,20 +193,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest5Attributes + * @throws IOException if the JSON Element is invalid with respect to ArchiveCustomerRequestAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest5Attributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest5Attributes is not found in the empty JSON string", ExecuteRequest5Attributes.openapiRequiredFields.toString())); + if (!ArchiveCustomerRequestAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ArchiveCustomerRequestAttributes is not found in the empty JSON string", ArchiveCustomerRequestAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest5Attributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest5Attributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!ArchiveCustomerRequestAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArchiveCustomerRequestAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -219,22 +219,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest5Attributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest5Attributes' and its subtypes + if (!ArchiveCustomerRequestAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ArchiveCustomerRequestAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest5Attributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ArchiveCustomerRequestAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest5Attributes value) throws IOException { + public void write(JsonWriter out, ArchiveCustomerRequestAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest5Attributes read(JsonReader in) throws IOException { + public ArchiveCustomerRequestAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -245,18 +245,18 @@ public ExecuteRequest5Attributes read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest5Attributes given an JSON string + * Create an instance of ArchiveCustomerRequestAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest5Attributes - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest5Attributes + * @return An instance of ArchiveCustomerRequestAttributes + * @throws IOException if the JSON string is invalid with respect to ArchiveCustomerRequestAttributes */ - public static ExecuteRequest5Attributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest5Attributes.class); + public static ArchiveCustomerRequestAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ArchiveCustomerRequestAttributes.class); } /** - * Convert an instance of ExecuteRequest5Attributes to an JSON string + * Convert an instance of ArchiveCustomerRequestAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/Astra.java b/src/main/java/org/openapitools/client/model/Astra.java index d55ad8fe..4db4dda5 100644 --- a/src/main/java/org/openapitools/client/model/Astra.java +++ b/src/main/java/org/openapitools/client/model/Astra.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AtmAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/AtmAuthorizationRequest.java index 534e1682..7e625a34 100644 --- a/src/main/java/org/openapitools/client/model/AtmAuthorizationRequest.java +++ b/src/main/java/org/openapitools/client/model/AtmAuthorizationRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AtmAuthorizationRequestAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AtmAuthorizationRequestAllOfAttributes.java index f4f7a317..28c02431 100644 --- a/src/main/java/org/openapitools/client/model/AtmAuthorizationRequestAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/AtmAuthorizationRequestAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DisableStopPaymentRequest.java b/src/main/java/org/openapitools/client/model/AtmLocation.java similarity index 59% rename from src/main/java/org/openapitools/client/model/DisableStopPaymentRequest.java rename to src/main/java/org/openapitools/client/model/AtmLocation.java index 9f575110..c474718a 100644 --- a/src/main/java/org/openapitools/client/model/DisableStopPaymentRequest.java +++ b/src/main/java/org/openapitools/client/model/AtmLocation.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.client.model.AtmLocationAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -47,35 +48,60 @@ import org.openapitools.client.JSON; /** - * DisableStopPaymentRequest + * AtmLocation */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DisableStopPaymentRequest { - public static final String SERIALIZED_NAME_STOP_PAYMENT_ID = "stop_payment_id"; - @SerializedName(SERIALIZED_NAME_STOP_PAYMENT_ID) - private String stopPaymentId; +public class AtmLocation { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "atmLocation"; - public DisableStopPaymentRequest() { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AtmLocationAttributes attributes; + + public AtmLocation() { + } + + public AtmLocation type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; } - public DisableStopPaymentRequest stopPaymentId(String stopPaymentId) { + + public void setType(String type) { + this.type = type; + } + + + public AtmLocation attributes(AtmLocationAttributes attributes) { - this.stopPaymentId = stopPaymentId; + this.attributes = attributes; return this; } /** - * Get stopPaymentId - * @return stopPaymentId + * Get attributes + * @return attributes **/ @javax.annotation.Nonnull - public String getStopPaymentId() { - return stopPaymentId; + public AtmLocationAttributes getAttributes() { + return attributes; } - public void setStopPaymentId(String stopPaymentId) { - this.stopPaymentId = stopPaymentId; + public void setAttributes(AtmLocationAttributes attributes) { + this.attributes = attributes; } @@ -88,20 +114,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DisableStopPaymentRequest disableStopPaymentRequest = (DisableStopPaymentRequest) o; - return Objects.equals(this.stopPaymentId, disableStopPaymentRequest.stopPaymentId); + AtmLocation atmLocation = (AtmLocation) o; + return Objects.equals(this.type, atmLocation.type) && + Objects.equals(this.attributes, atmLocation.attributes); } @Override public int hashCode() { - return Objects.hash(stopPaymentId); + return Objects.hash(type, attributes); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DisableStopPaymentRequest {\n"); - sb.append(" stopPaymentId: ").append(toIndentedString(stopPaymentId)).append("\n"); + sb.append("class AtmLocation {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append("}"); return sb.toString(); } @@ -124,66 +152,70 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("stop_payment_id"); + openapiFields.add("type"); + openapiFields.add("attributes"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("stop_payment_id"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DisableStopPaymentRequest + * @throws IOException if the JSON Element is invalid with respect to AtmLocation */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!DisableStopPaymentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DisableStopPaymentRequest is not found in the empty JSON string", DisableStopPaymentRequest.openapiRequiredFields.toString())); + if (!AtmLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AtmLocation is not found in the empty JSON string", AtmLocation.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!DisableStopPaymentRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DisableStopPaymentRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!AtmLocation.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AtmLocation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DisableStopPaymentRequest.openapiRequiredFields) { + for (String requiredField : AtmLocation.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("stop_payment_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stop_payment_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stop_payment_id").toString())); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } + // validate the required field `attributes` + AtmLocationAttributes.validateJsonElement(jsonObj.get("attributes")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!DisableStopPaymentRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DisableStopPaymentRequest' and its subtypes + if (!AtmLocation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AtmLocation' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DisableStopPaymentRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AtmLocation.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, DisableStopPaymentRequest value) throws IOException { + public void write(JsonWriter out, AtmLocation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public DisableStopPaymentRequest read(JsonReader in) throws IOException { + public AtmLocation read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -194,18 +226,18 @@ public DisableStopPaymentRequest read(JsonReader in) throws IOException { } /** - * Create an instance of DisableStopPaymentRequest given an JSON string + * Create an instance of AtmLocation given an JSON string * * @param jsonString JSON string - * @return An instance of DisableStopPaymentRequest - * @throws IOException if the JSON string is invalid with respect to DisableStopPaymentRequest + * @return An instance of AtmLocation + * @throws IOException if the JSON string is invalid with respect to AtmLocation */ - public static DisableStopPaymentRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DisableStopPaymentRequest.class); + public static AtmLocation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AtmLocation.class); } /** - * Convert an instance of DisableStopPaymentRequest to an JSON string + * Convert an instance of AtmLocation to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/AtmLocationAttributes.java b/src/main/java/org/openapitools/client/model/AtmLocationAttributes.java new file mode 100644 index 00000000..12f7d9ff --- /dev/null +++ b/src/main/java/org/openapitools/client/model/AtmLocationAttributes.java @@ -0,0 +1,389 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.Address; +import org.openapitools.client.model.Coordinates; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * AtmLocationAttributes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AtmLocationAttributes { + public static final String SERIALIZED_NAME_NETWORK = "network"; + @SerializedName(SERIALIZED_NAME_NETWORK) + private String network; + + public static final String SERIALIZED_NAME_LOCATION_NAME = "locationName"; + @SerializedName(SERIALIZED_NAME_LOCATION_NAME) + private String locationName; + + public static final String SERIALIZED_NAME_COORDINATES = "coordinates"; + @SerializedName(SERIALIZED_NAME_COORDINATES) + private Coordinates coordinates; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private Address address; + + public static final String SERIALIZED_NAME_DISTANCE = "distance"; + @SerializedName(SERIALIZED_NAME_DISTANCE) + private Integer distance; + + public static final String SERIALIZED_NAME_SURCHARGE_FREE = "surchargeFree"; + @SerializedName(SERIALIZED_NAME_SURCHARGE_FREE) + private Boolean surchargeFree; + + public static final String SERIALIZED_NAME_ACCEPT_DEPOSITS = "acceptDeposits"; + @SerializedName(SERIALIZED_NAME_ACCEPT_DEPOSITS) + private Boolean acceptDeposits; + + public AtmLocationAttributes() { + } + + public AtmLocationAttributes network(String network) { + + this.network = network; + return this; + } + + /** + * Get network + * @return network + **/ + @javax.annotation.Nullable + public String getNetwork() { + return network; + } + + + public void setNetwork(String network) { + this.network = network; + } + + + public AtmLocationAttributes locationName(String locationName) { + + this.locationName = locationName; + return this; + } + + /** + * Get locationName + * @return locationName + **/ + @javax.annotation.Nullable + public String getLocationName() { + return locationName; + } + + + public void setLocationName(String locationName) { + this.locationName = locationName; + } + + + public AtmLocationAttributes coordinates(Coordinates coordinates) { + + this.coordinates = coordinates; + return this; + } + + /** + * Get coordinates + * @return coordinates + **/ + @javax.annotation.Nullable + public Coordinates getCoordinates() { + return coordinates; + } + + + public void setCoordinates(Coordinates coordinates) { + this.coordinates = coordinates; + } + + + public AtmLocationAttributes address(Address address) { + + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @javax.annotation.Nullable + public Address getAddress() { + return address; + } + + + public void setAddress(Address address) { + this.address = address; + } + + + public AtmLocationAttributes distance(Integer distance) { + + this.distance = distance; + return this; + } + + /** + * Get distance + * @return distance + **/ + @javax.annotation.Nullable + public Integer getDistance() { + return distance; + } + + + public void setDistance(Integer distance) { + this.distance = distance; + } + + + public AtmLocationAttributes surchargeFree(Boolean surchargeFree) { + + this.surchargeFree = surchargeFree; + return this; + } + + /** + * Get surchargeFree + * @return surchargeFree + **/ + @javax.annotation.Nullable + public Boolean getSurchargeFree() { + return surchargeFree; + } + + + public void setSurchargeFree(Boolean surchargeFree) { + this.surchargeFree = surchargeFree; + } + + + public AtmLocationAttributes acceptDeposits(Boolean acceptDeposits) { + + this.acceptDeposits = acceptDeposits; + return this; + } + + /** + * Get acceptDeposits + * @return acceptDeposits + **/ + @javax.annotation.Nullable + public Boolean getAcceptDeposits() { + return acceptDeposits; + } + + + public void setAcceptDeposits(Boolean acceptDeposits) { + this.acceptDeposits = acceptDeposits; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AtmLocationAttributes atmLocationAttributes = (AtmLocationAttributes) o; + return Objects.equals(this.network, atmLocationAttributes.network) && + Objects.equals(this.locationName, atmLocationAttributes.locationName) && + Objects.equals(this.coordinates, atmLocationAttributes.coordinates) && + Objects.equals(this.address, atmLocationAttributes.address) && + Objects.equals(this.distance, atmLocationAttributes.distance) && + Objects.equals(this.surchargeFree, atmLocationAttributes.surchargeFree) && + Objects.equals(this.acceptDeposits, atmLocationAttributes.acceptDeposits); + } + + @Override + public int hashCode() { + return Objects.hash(network, locationName, coordinates, address, distance, surchargeFree, acceptDeposits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AtmLocationAttributes {\n"); + sb.append(" network: ").append(toIndentedString(network)).append("\n"); + sb.append(" locationName: ").append(toIndentedString(locationName)).append("\n"); + sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" distance: ").append(toIndentedString(distance)).append("\n"); + sb.append(" surchargeFree: ").append(toIndentedString(surchargeFree)).append("\n"); + sb.append(" acceptDeposits: ").append(toIndentedString(acceptDeposits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("network"); + openapiFields.add("locationName"); + openapiFields.add("coordinates"); + openapiFields.add("address"); + openapiFields.add("distance"); + openapiFields.add("surchargeFree"); + openapiFields.add("acceptDeposits"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AtmLocationAttributes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AtmLocationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AtmLocationAttributes is not found in the empty JSON string", AtmLocationAttributes.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AtmLocationAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AtmLocationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) && !jsonObj.get("network").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); + } + if ((jsonObj.get("locationName") != null && !jsonObj.get("locationName").isJsonNull()) && !jsonObj.get("locationName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `locationName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locationName").toString())); + } + // validate the optional field `coordinates` + if (jsonObj.get("coordinates") != null && !jsonObj.get("coordinates").isJsonNull()) { + Coordinates.validateJsonElement(jsonObj.get("coordinates")); + } + // validate the optional field `address` + if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { + Address.validateJsonElement(jsonObj.get("address")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AtmLocationAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AtmLocationAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AtmLocationAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AtmLocationAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AtmLocationAttributes read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AtmLocationAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of AtmLocationAttributes + * @throws IOException if the JSON string is invalid with respect to AtmLocationAttributes + */ + public static AtmLocationAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AtmLocationAttributes.class); + } + + /** + * Convert an instance of AtmLocationAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/AtmTransaction.java b/src/main/java/org/openapitools/client/model/AtmTransaction.java index b84af09e..c1f671d9 100644 --- a/src/main/java/org/openapitools/client/model/AtmTransaction.java +++ b/src/main/java/org/openapitools/client/model/AtmTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AtmTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AtmTransactionAllOfAttributes.java index d7ab47f9..043f3d9c 100644 --- a/src/main/java/org/openapitools/client/model/AtmTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/AtmTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Authorization.java b/src/main/java/org/openapitools/client/model/Authorization.java index e4be009e..2be2fd66 100644 --- a/src/main/java/org/openapitools/client/model/Authorization.java +++ b/src/main/java/org/openapitools/client/model/Authorization.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizationAttributes.java b/src/main/java/org/openapitools/client/model/AuthorizationAttributes.java index 36efd6c6..c008fb14 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizationAttributes.java +++ b/src/main/java/org/openapitools/client/model/AuthorizationAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRelationship.java b/src/main/java/org/openapitools/client/model/AuthorizationRelationship.java index a38584b7..388aeaf0 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizationRelationship.java +++ b/src/main/java/org/openapitools/client/model/AuthorizationRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRelationshipData.java b/src/main/java/org/openapitools/client/model/AuthorizationRelationshipData.java index d7cb89e1..747dc2cf 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizationRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/AuthorizationRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequest.java b/src/main/java/org/openapitools/client/model/AuthorizationRequest.java index 76d63bcc..c8a6c5c7 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequest.java +++ b/src/main/java/org/openapitools/client/model/AuthorizationRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationship.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationship.java index 9bce0f16..e6569b79 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationship.java +++ b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipData.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipData.java index 257d837a..cd610c8c 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationships.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationships.java index ac6846ba..8aaae1e9 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationships.java +++ b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCard.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCard.java index 30ca5720..7fb13348 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCard.java +++ b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCardData.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCardData.java index 1c5fcbcf..db936235 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCardData.java +++ b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCardData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/AuthorizedUser.java b/src/main/java/org/openapitools/client/model/AuthorizedUser.java index 4725dbc3..eee33bbc 100644 --- a/src/main/java/org/openapitools/client/model/AuthorizedUser.java +++ b/src/main/java/org/openapitools/client/model/AuthorizedUser.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BIN.java b/src/main/java/org/openapitools/client/model/BIN.java index 026cc77b..7522097e 100644 --- a/src/main/java/org/openapitools/client/model/BIN.java +++ b/src/main/java/org/openapitools/client/model/BIN.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BankRepaymentTransaction.java b/src/main/java/org/openapitools/client/model/BankRepaymentTransaction.java index dd44b089..ebdc1f76 100644 --- a/src/main/java/org/openapitools/client/model/BankRepaymentTransaction.java +++ b/src/main/java/org/openapitools/client/model/BankRepaymentTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BankRepaymentTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BankRepaymentTransactionAllOfAttributes.java index 6b085396..b7effe57 100644 --- a/src/main/java/org/openapitools/client/model/BankRepaymentTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/BankRepaymentTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BeneficialOwner.java b/src/main/java/org/openapitools/client/model/BeneficialOwner.java index 8868c285..04581920 100644 --- a/src/main/java/org/openapitools/client/model/BeneficialOwner.java +++ b/src/main/java/org/openapitools/client/model/BeneficialOwner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,10 +21,13 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.LocalDate; +import java.util.ArrayList; import java.util.Arrays; -import org.openapitools.client.model.Address; +import java.util.List; import org.openapitools.client.model.AnnualIncome; +import org.openapitools.client.model.FullName; import org.openapitools.client.model.Occupation; +import org.openapitools.client.model.Phone; import org.openapitools.client.model.SourceOfIncome; import com.google.gson.Gson; @@ -56,6 +59,22 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class BeneficialOwner { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; + @SerializedName(SERIALIZED_NAME_FULL_NAME) + private FullName fullName; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_PHONE = "phone"; + @SerializedName(SERIALIZED_NAME_PHONE) + private Phone phone; + public static final String SERIALIZED_NAME_SSN = "ssn"; @SerializedName(SERIALIZED_NAME_SSN) private String ssn; @@ -74,12 +93,44 @@ public class BeneficialOwner { public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; + private Object address; public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) private LocalDate dateOfBirth; + public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; + @SerializedName(SERIALIZED_NAME_EVALUATION_ID) + private String evaluationId; + + public static final String SERIALIZED_NAME_PERCENTAGE = "percentage"; + @SerializedName(SERIALIZED_NAME_PERCENTAGE) + private Integer percentage; + + public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; + @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) + private List evaluationFlags; + + public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; + @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) + private String maskedSSN; + + public static final String SERIALIZED_NAME_MASKED_PASSPORT = "maskedPassport"; + @SerializedName(SERIALIZED_NAME_MASKED_PASSPORT) + private String maskedPassport; + + public static final String SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; + @SerializedName(SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR) + private String maskedMatriculaConsular; + + public static final String SERIALIZED_NAME_ID_THEFT_SCORE = "idTheftScore"; + @SerializedName(SERIALIZED_NAME_ID_THEFT_SCORE) + private Integer idTheftScore; + + public static final String SERIALIZED_NAME_EVALUATION_CODES = "evaluationCodes"; + @SerializedName(SERIALIZED_NAME_EVALUATION_CODES) + private List evaluationCodes; + public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; @SerializedName(SERIALIZED_NAME_OCCUPATION) private Occupation occupation; @@ -95,6 +146,90 @@ public class BeneficialOwner { public BeneficialOwner() { } + public BeneficialOwner status(String status) { + + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + public BeneficialOwner fullName(FullName fullName) { + + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @javax.annotation.Nullable + public FullName getFullName() { + return fullName; + } + + + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public BeneficialOwner email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + public BeneficialOwner phone(Phone phone) { + + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @javax.annotation.Nullable + public Phone getPhone() { + return phone; + } + + + public void setPhone(Phone phone) { + this.phone = phone; + } + + public BeneficialOwner ssn(String ssn) { this.ssn = ssn; @@ -179,7 +314,7 @@ public void setMatriculaConsular(String matriculaConsular) { } - public BeneficialOwner address(Address address) { + public BeneficialOwner address(Object address) { this.address = address; return this; @@ -190,12 +325,12 @@ public BeneficialOwner address(Address address) { * @return address **/ @javax.annotation.Nullable - public Address getAddress() { + public Object getAddress() { return address; } - public void setAddress(Address address) { + public void setAddress(Object address) { this.address = address; } @@ -221,6 +356,192 @@ public void setDateOfBirth(LocalDate dateOfBirth) { } + public BeneficialOwner evaluationId(String evaluationId) { + + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + **/ + @javax.annotation.Nullable + public String getEvaluationId() { + return evaluationId; + } + + + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; + } + + + public BeneficialOwner percentage(Integer percentage) { + + this.percentage = percentage; + return this; + } + + /** + * Get percentage + * minimum: 0 + * maximum: 100 + * @return percentage + **/ + @javax.annotation.Nullable + public Integer getPercentage() { + return percentage; + } + + + public void setPercentage(Integer percentage) { + this.percentage = percentage; + } + + + public BeneficialOwner evaluationFlags(List evaluationFlags) { + + this.evaluationFlags = evaluationFlags; + return this; + } + + public BeneficialOwner addEvaluationFlagsItem(String evaluationFlagsItem) { + if (this.evaluationFlags == null) { + this.evaluationFlags = new ArrayList<>(); + } + this.evaluationFlags.add(evaluationFlagsItem); + return this; + } + + /** + * Get evaluationFlags + * @return evaluationFlags + **/ + @javax.annotation.Nullable + public List getEvaluationFlags() { + return evaluationFlags; + } + + + public void setEvaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + } + + + public BeneficialOwner maskedSSN(String maskedSSN) { + + this.maskedSSN = maskedSSN; + return this; + } + + /** + * Get maskedSSN + * @return maskedSSN + **/ + @javax.annotation.Nullable + public String getMaskedSSN() { + return maskedSSN; + } + + + public void setMaskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + } + + + public BeneficialOwner maskedPassport(String maskedPassport) { + + this.maskedPassport = maskedPassport; + return this; + } + + /** + * Get maskedPassport + * @return maskedPassport + **/ + @javax.annotation.Nullable + public String getMaskedPassport() { + return maskedPassport; + } + + + public void setMaskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + } + + + public BeneficialOwner maskedMatriculaConsular(String maskedMatriculaConsular) { + + this.maskedMatriculaConsular = maskedMatriculaConsular; + return this; + } + + /** + * Get maskedMatriculaConsular + * @return maskedMatriculaConsular + **/ + @javax.annotation.Nullable + public String getMaskedMatriculaConsular() { + return maskedMatriculaConsular; + } + + + public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + } + + + public BeneficialOwner idTheftScore(Integer idTheftScore) { + + this.idTheftScore = idTheftScore; + return this; + } + + /** + * Get idTheftScore + * @return idTheftScore + **/ + @javax.annotation.Nullable + public Integer getIdTheftScore() { + return idTheftScore; + } + + + public void setIdTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; + } + + + public BeneficialOwner evaluationCodes(List evaluationCodes) { + + this.evaluationCodes = evaluationCodes; + return this; + } + + public BeneficialOwner addEvaluationCodesItem(String evaluationCodesItem) { + if (this.evaluationCodes == null) { + this.evaluationCodes = new ArrayList<>(); + } + this.evaluationCodes.add(evaluationCodesItem); + return this; + } + + /** + * Get evaluationCodes + * @return evaluationCodes + **/ + @javax.annotation.Nullable + public List getEvaluationCodes() { + return evaluationCodes; + } + + + public void setEvaluationCodes(List evaluationCodes) { + this.evaluationCodes = evaluationCodes; + } + + public BeneficialOwner occupation(Occupation occupation) { this.occupation = occupation; @@ -294,12 +615,24 @@ public boolean equals(Object o) { return false; } BeneficialOwner beneficialOwner = (BeneficialOwner) o; - return Objects.equals(this.ssn, beneficialOwner.ssn) && + return Objects.equals(this.status, beneficialOwner.status) && + Objects.equals(this.fullName, beneficialOwner.fullName) && + Objects.equals(this.email, beneficialOwner.email) && + Objects.equals(this.phone, beneficialOwner.phone) && + Objects.equals(this.ssn, beneficialOwner.ssn) && Objects.equals(this.passport, beneficialOwner.passport) && Objects.equals(this.nationality, beneficialOwner.nationality) && Objects.equals(this.matriculaConsular, beneficialOwner.matriculaConsular) && Objects.equals(this.address, beneficialOwner.address) && Objects.equals(this.dateOfBirth, beneficialOwner.dateOfBirth) && + Objects.equals(this.evaluationId, beneficialOwner.evaluationId) && + Objects.equals(this.percentage, beneficialOwner.percentage) && + Objects.equals(this.evaluationFlags, beneficialOwner.evaluationFlags) && + Objects.equals(this.maskedSSN, beneficialOwner.maskedSSN) && + Objects.equals(this.maskedPassport, beneficialOwner.maskedPassport) && + Objects.equals(this.maskedMatriculaConsular, beneficialOwner.maskedMatriculaConsular) && + Objects.equals(this.idTheftScore, beneficialOwner.idTheftScore) && + Objects.equals(this.evaluationCodes, beneficialOwner.evaluationCodes) && Objects.equals(this.occupation, beneficialOwner.occupation) && Objects.equals(this.annualIncome, beneficialOwner.annualIncome) && Objects.equals(this.sourceOfIncome, beneficialOwner.sourceOfIncome); @@ -307,19 +640,31 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(ssn, passport, nationality, matriculaConsular, address, dateOfBirth, occupation, annualIncome, sourceOfIncome); + return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, percentage, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore, evaluationCodes, occupation, annualIncome, sourceOfIncome); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BeneficialOwner {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); + sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); + sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); + sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); + sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); + sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); + sb.append(" evaluationCodes: ").append(toIndentedString(evaluationCodes)).append("\n"); sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); @@ -345,12 +690,24 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("fullName"); + openapiFields.add("email"); + openapiFields.add("phone"); openapiFields.add("ssn"); openapiFields.add("passport"); openapiFields.add("nationality"); openapiFields.add("matriculaConsular"); openapiFields.add("address"); openapiFields.add("dateOfBirth"); + openapiFields.add("evaluationId"); + openapiFields.add("percentage"); + openapiFields.add("evaluationFlags"); + openapiFields.add("maskedSSN"); + openapiFields.add("maskedPassport"); + openapiFields.add("maskedMatriculaConsular"); + openapiFields.add("idTheftScore"); + openapiFields.add("evaluationCodes"); openapiFields.add("occupation"); openapiFields.add("annualIncome"); openapiFields.add("sourceOfIncome"); @@ -380,6 +737,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `fullName` + if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { + FullName.validateJsonElement(jsonObj.get("fullName")); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + // validate the optional field `phone` + if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { + Phone.validateJsonElement(jsonObj.get("phone")); + } if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); } @@ -392,9 +763,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); + if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); + } + if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); + } + if ((jsonObj.get("maskedPassport") != null && !jsonObj.get("maskedPassport").isJsonNull()) && !jsonObj.get("maskedPassport").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `maskedPassport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedPassport").toString())); + } + if ((jsonObj.get("maskedMatriculaConsular") != null && !jsonObj.get("maskedMatriculaConsular").isJsonNull()) && !jsonObj.get("maskedMatriculaConsular").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `maskedMatriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedMatriculaConsular").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("evaluationCodes") != null && !jsonObj.get("evaluationCodes").isJsonNull() && !jsonObj.get("evaluationCodes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `evaluationCodes` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationCodes").toString())); } } diff --git a/src/main/java/org/openapitools/client/model/BeneficialOwner1.java b/src/main/java/org/openapitools/client/model/BeneficialOwner1.java deleted file mode 100644 index 97255e55..00000000 --- a/src/main/java/org/openapitools/client/model/BeneficialOwner1.java +++ /dev/null @@ -1,837 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.SourceOfIncome; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BeneficialOwner1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BeneficialOwner1 { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Object address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - public static final String SERIALIZED_NAME_PERCENTAGE = "percentage"; - @SerializedName(SERIALIZED_NAME_PERCENTAGE) - private Integer percentage; - - public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; - @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) - private List evaluationFlags; - - public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; - @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) - private String maskedSSN; - - public static final String SERIALIZED_NAME_MASKED_PASSPORT = "maskedPassport"; - @SerializedName(SERIALIZED_NAME_MASKED_PASSPORT) - private String maskedPassport; - - public static final String SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; - @SerializedName(SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR) - private String maskedMatriculaConsular; - - public static final String SERIALIZED_NAME_ID_THEFT_SCORE = "idTheftScore"; - @SerializedName(SERIALIZED_NAME_ID_THEFT_SCORE) - private Integer idTheftScore; - - public static final String SERIALIZED_NAME_EVALUATION_CODES = "evaluationCodes"; - @SerializedName(SERIALIZED_NAME_EVALUATION_CODES) - private List evaluationCodes; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public BeneficialOwner1() { - } - - public BeneficialOwner1 status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public BeneficialOwner1 fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public BeneficialOwner1 email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public BeneficialOwner1 phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public BeneficialOwner1 ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public BeneficialOwner1 passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public BeneficialOwner1 nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public BeneficialOwner1 matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public BeneficialOwner1 address(Object address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Object getAddress() { - return address; - } - - - public void setAddress(Object address) { - this.address = address; - } - - - public BeneficialOwner1 dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public BeneficialOwner1 evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public BeneficialOwner1 percentage(Integer percentage) { - - this.percentage = percentage; - return this; - } - - /** - * Get percentage - * minimum: 0 - * maximum: 100 - * @return percentage - **/ - @javax.annotation.Nullable - public Integer getPercentage() { - return percentage; - } - - - public void setPercentage(Integer percentage) { - this.percentage = percentage; - } - - - public BeneficialOwner1 evaluationFlags(List evaluationFlags) { - - this.evaluationFlags = evaluationFlags; - return this; - } - - public BeneficialOwner1 addEvaluationFlagsItem(String evaluationFlagsItem) { - if (this.evaluationFlags == null) { - this.evaluationFlags = new ArrayList<>(); - } - this.evaluationFlags.add(evaluationFlagsItem); - return this; - } - - /** - * Get evaluationFlags - * @return evaluationFlags - **/ - @javax.annotation.Nullable - public List getEvaluationFlags() { - return evaluationFlags; - } - - - public void setEvaluationFlags(List evaluationFlags) { - this.evaluationFlags = evaluationFlags; - } - - - public BeneficialOwner1 maskedSSN(String maskedSSN) { - - this.maskedSSN = maskedSSN; - return this; - } - - /** - * Get maskedSSN - * @return maskedSSN - **/ - @javax.annotation.Nullable - public String getMaskedSSN() { - return maskedSSN; - } - - - public void setMaskedSSN(String maskedSSN) { - this.maskedSSN = maskedSSN; - } - - - public BeneficialOwner1 maskedPassport(String maskedPassport) { - - this.maskedPassport = maskedPassport; - return this; - } - - /** - * Get maskedPassport - * @return maskedPassport - **/ - @javax.annotation.Nullable - public String getMaskedPassport() { - return maskedPassport; - } - - - public void setMaskedPassport(String maskedPassport) { - this.maskedPassport = maskedPassport; - } - - - public BeneficialOwner1 maskedMatriculaConsular(String maskedMatriculaConsular) { - - this.maskedMatriculaConsular = maskedMatriculaConsular; - return this; - } - - /** - * Get maskedMatriculaConsular - * @return maskedMatriculaConsular - **/ - @javax.annotation.Nullable - public String getMaskedMatriculaConsular() { - return maskedMatriculaConsular; - } - - - public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { - this.maskedMatriculaConsular = maskedMatriculaConsular; - } - - - public BeneficialOwner1 idTheftScore(Integer idTheftScore) { - - this.idTheftScore = idTheftScore; - return this; - } - - /** - * Get idTheftScore - * @return idTheftScore - **/ - @javax.annotation.Nullable - public Integer getIdTheftScore() { - return idTheftScore; - } - - - public void setIdTheftScore(Integer idTheftScore) { - this.idTheftScore = idTheftScore; - } - - - public BeneficialOwner1 evaluationCodes(List evaluationCodes) { - - this.evaluationCodes = evaluationCodes; - return this; - } - - public BeneficialOwner1 addEvaluationCodesItem(String evaluationCodesItem) { - if (this.evaluationCodes == null) { - this.evaluationCodes = new ArrayList<>(); - } - this.evaluationCodes.add(evaluationCodesItem); - return this; - } - - /** - * Get evaluationCodes - * @return evaluationCodes - **/ - @javax.annotation.Nullable - public List getEvaluationCodes() { - return evaluationCodes; - } - - - public void setEvaluationCodes(List evaluationCodes) { - this.evaluationCodes = evaluationCodes; - } - - - public BeneficialOwner1 occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public BeneficialOwner1 annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public BeneficialOwner1 sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BeneficialOwner1 beneficialOwner1 = (BeneficialOwner1) o; - return Objects.equals(this.status, beneficialOwner1.status) && - Objects.equals(this.fullName, beneficialOwner1.fullName) && - Objects.equals(this.email, beneficialOwner1.email) && - Objects.equals(this.phone, beneficialOwner1.phone) && - Objects.equals(this.ssn, beneficialOwner1.ssn) && - Objects.equals(this.passport, beneficialOwner1.passport) && - Objects.equals(this.nationality, beneficialOwner1.nationality) && - Objects.equals(this.matriculaConsular, beneficialOwner1.matriculaConsular) && - Objects.equals(this.address, beneficialOwner1.address) && - Objects.equals(this.dateOfBirth, beneficialOwner1.dateOfBirth) && - Objects.equals(this.evaluationId, beneficialOwner1.evaluationId) && - Objects.equals(this.percentage, beneficialOwner1.percentage) && - Objects.equals(this.evaluationFlags, beneficialOwner1.evaluationFlags) && - Objects.equals(this.maskedSSN, beneficialOwner1.maskedSSN) && - Objects.equals(this.maskedPassport, beneficialOwner1.maskedPassport) && - Objects.equals(this.maskedMatriculaConsular, beneficialOwner1.maskedMatriculaConsular) && - Objects.equals(this.idTheftScore, beneficialOwner1.idTheftScore) && - Objects.equals(this.evaluationCodes, beneficialOwner1.evaluationCodes) && - Objects.equals(this.occupation, beneficialOwner1.occupation) && - Objects.equals(this.annualIncome, beneficialOwner1.annualIncome) && - Objects.equals(this.sourceOfIncome, beneficialOwner1.sourceOfIncome); - } - - @Override - public int hashCode() { - return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, percentage, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore, evaluationCodes, occupation, annualIncome, sourceOfIncome); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BeneficialOwner1 {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); - sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); - sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); - sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); - sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); - sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); - sb.append(" evaluationCodes: ").append(toIndentedString(evaluationCodes)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("evaluationId"); - openapiFields.add("percentage"); - openapiFields.add("evaluationFlags"); - openapiFields.add("maskedSSN"); - openapiFields.add("maskedPassport"); - openapiFields.add("maskedMatriculaConsular"); - openapiFields.add("idTheftScore"); - openapiFields.add("evaluationCodes"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BeneficialOwner1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BeneficialOwner1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BeneficialOwner1 is not found in the empty JSON string", BeneficialOwner1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BeneficialOwner1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BeneficialOwner1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // validate the optional field `fullName` - if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { - FullName.validateJsonElement(jsonObj.get("fullName")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); - } - if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); - } - if ((jsonObj.get("maskedPassport") != null && !jsonObj.get("maskedPassport").isJsonNull()) && !jsonObj.get("maskedPassport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedPassport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedPassport").toString())); - } - if ((jsonObj.get("maskedMatriculaConsular") != null && !jsonObj.get("maskedMatriculaConsular").isJsonNull()) && !jsonObj.get("maskedMatriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedMatriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedMatriculaConsular").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationCodes") != null && !jsonObj.get("evaluationCodes").isJsonNull() && !jsonObj.get("evaluationCodes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationCodes` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationCodes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BeneficialOwner1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BeneficialOwner1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BeneficialOwner1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BeneficialOwner1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BeneficialOwner1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BeneficialOwner1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of BeneficialOwner1 - * @throws IOException if the JSON string is invalid with respect to BeneficialOwner1 - */ - public static BeneficialOwner1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BeneficialOwner1.class); - } - - /** - * Convert an instance of BeneficialOwner1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Beneficiary.java b/src/main/java/org/openapitools/client/model/Beneficiary.java index 8b53a295..b3f30683 100644 --- a/src/main/java/org/openapitools/client/model/Beneficiary.java +++ b/src/main/java/org/openapitools/client/model/Beneficiary.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BillPayTransaction.java b/src/main/java/org/openapitools/client/model/BillPayTransaction.java index f0c6f89b..43c35c6e 100644 --- a/src/main/java/org/openapitools/client/model/BillPayTransaction.java +++ b/src/main/java/org/openapitools/client/model/BillPayTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BillPayment.java b/src/main/java/org/openapitools/client/model/BillPayment.java index b9353408..b3428629 100644 --- a/src/main/java/org/openapitools/client/model/BillPayment.java +++ b/src/main/java/org/openapitools/client/model/BillPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BillPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BillPaymentAllOfAttributes.java index 4397147e..b1bb60c3 100644 --- a/src/main/java/org/openapitools/client/model/BillPaymentAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/BillPaymentAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BookPayment.java b/src/main/java/org/openapitools/client/model/BookPayment.java index b46f12bb..43db8d26 100644 --- a/src/main/java/org/openapitools/client/model/BookPayment.java +++ b/src/main/java/org/openapitools/client/model/BookPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BookPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BookPaymentAllOfAttributes.java index 0036231b..feb8722c 100644 --- a/src/main/java/org/openapitools/client/model/BookPaymentAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/BookPaymentAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BookRepayment.java b/src/main/java/org/openapitools/client/model/BookRepayment.java index 4a23774c..efc4415c 100644 --- a/src/main/java/org/openapitools/client/model/BookRepayment.java +++ b/src/main/java/org/openapitools/client/model/BookRepayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfAttributes.java index 342871b2..5e0dd079 100644 --- a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationships.java b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationships.java index 214331b7..7f1b8606 100644 --- a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationships.java +++ b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java index 46e01c8c..620a9106 100644 --- a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java +++ b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java index 74efff60..20cb54a5 100644 --- a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java +++ b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BookTransaction.java b/src/main/java/org/openapitools/client/model/BookTransaction.java index 32cc5e30..96ddb707 100644 --- a/src/main/java/org/openapitools/client/model/BookTransaction.java +++ b/src/main/java/org/openapitools/client/model/BookTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BookTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BookTransactionAllOfAttributes.java index 99b2adc9..3f161c58 100644 --- a/src/main/java/org/openapitools/client/model/BookTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/BookTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessAnnualRevenue.java b/src/main/java/org/openapitools/client/model/BusinessAnnualRevenue.java index e93e4d59..196225d8 100644 --- a/src/main/java/org/openapitools/client/model/BusinessAnnualRevenue.java +++ b/src/main/java/org/openapitools/client/model/BusinessAnnualRevenue.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessApplication.java b/src/main/java/org/openapitools/client/model/BusinessApplication.java index 2d130134..a1305e58 100644 --- a/src/main/java/org/openapitools/client/model/BusinessApplication.java +++ b/src/main/java/org/openapitools/client/model/BusinessApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessApplicationAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BusinessApplicationAllOfAttributes.java index 9c17f64c..3c3c3f84 100644 --- a/src/main/java/org/openapitools/client/model/BusinessApplicationAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/BusinessApplicationAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ import java.util.List; import org.openapitools.client.model.Address; import org.openapitools.client.model.ApplicationStatus; -import org.openapitools.client.model.BeneficialOwner1; +import org.openapitools.client.model.BeneficialOwner; import org.openapitools.client.model.BusinessAnnualRevenue; import org.openapitools.client.model.BusinessNumberOfEmployees; import org.openapitools.client.model.BusinessVertical; @@ -35,7 +35,7 @@ import org.openapitools.client.model.Contact; import org.openapitools.client.model.EntityType; import org.openapitools.client.model.Industry; -import org.openapitools.client.model.Officer1; +import org.openapitools.client.model.Officer; import org.openapitools.client.model.Phone; import org.openapitools.jackson.nullable.JsonNullable; @@ -138,7 +138,7 @@ public class BusinessApplicationAllOfAttributes { public static final String SERIALIZED_NAME_OFFICER = "officer"; @SerializedName(SERIALIZED_NAME_OFFICER) - private Officer1 officer; + private Officer officer; public static final String SERIALIZED_NAME_IP = "ip"; @SerializedName(SERIALIZED_NAME_IP) @@ -150,7 +150,7 @@ public class BusinessApplicationAllOfAttributes { public static final String SERIALIZED_NAME_BENEFICIAL_OWNERS = "beneficialOwners"; @SerializedName(SERIALIZED_NAME_BENEFICIAL_OWNERS) - private List beneficialOwners = new ArrayList<>(); + private List beneficialOwners = new ArrayList<>(); /** * Gets or Sets decisionMethod @@ -680,7 +680,7 @@ public void setContact(Contact contact) { } - public BusinessApplicationAllOfAttributes officer(Officer1 officer) { + public BusinessApplicationAllOfAttributes officer(Officer officer) { this.officer = officer; return this; @@ -691,12 +691,12 @@ public BusinessApplicationAllOfAttributes officer(Officer1 officer) { * @return officer **/ @javax.annotation.Nonnull - public Officer1 getOfficer() { + public Officer getOfficer() { return officer; } - public void setOfficer(Officer1 officer) { + public void setOfficer(Officer officer) { this.officer = officer; } @@ -743,13 +743,13 @@ public void setWebsite(String website) { } - public BusinessApplicationAllOfAttributes beneficialOwners(List beneficialOwners) { + public BusinessApplicationAllOfAttributes beneficialOwners(List beneficialOwners) { this.beneficialOwners = beneficialOwners; return this; } - public BusinessApplicationAllOfAttributes addBeneficialOwnersItem(BeneficialOwner1 beneficialOwnersItem) { + public BusinessApplicationAllOfAttributes addBeneficialOwnersItem(BeneficialOwner beneficialOwnersItem) { if (this.beneficialOwners == null) { this.beneficialOwners = new ArrayList<>(); } @@ -762,12 +762,12 @@ public BusinessApplicationAllOfAttributes addBeneficialOwnersItem(BeneficialOwne * @return beneficialOwners **/ @javax.annotation.Nonnull - public List getBeneficialOwners() { + public List getBeneficialOwners() { return beneficialOwners; } - public void setBeneficialOwners(List beneficialOwners) { + public void setBeneficialOwners(List beneficialOwners) { this.beneficialOwners = beneficialOwners; } @@ -1416,7 +1416,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the required field `contact` Contact.validateJsonElement(jsonObj.get("contact")); // validate the required field `officer` - Officer1.validateJsonElement(jsonObj.get("officer")); + Officer.validateJsonElement(jsonObj.get("officer")); if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); } @@ -1431,7 +1431,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArraybeneficialOwners = jsonObj.getAsJsonArray("beneficialOwners"); // validate the required field `beneficialOwners` (array) for (int i = 0; i < jsonArraybeneficialOwners.size(); i++) { - BeneficialOwner1.validateJsonElement(jsonArraybeneficialOwners.get(i)); + BeneficialOwner.validateJsonElement(jsonArraybeneficialOwners.get(i)); }; if ((jsonObj.get("decisionMethod") != null && !jsonObj.get("decisionMethod").isJsonNull()) && !jsonObj.get("decisionMethod").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `decisionMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionMethod").toString())); diff --git a/src/main/java/org/openapitools/client/model/BusinessCreditCard.java b/src/main/java/org/openapitools/client/model/BusinessCreditCard.java index 75b65362..1453e530 100644 --- a/src/main/java/org/openapitools/client/model/BusinessCreditCard.java +++ b/src/main/java/org/openapitools/client/model/BusinessCreditCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessCustomer.java b/src/main/java/org/openapitools/client/model/BusinessCustomer.java index ca77a8c0..fb6fa732 100644 --- a/src/main/java/org/openapitools/client/model/BusinessCustomer.java +++ b/src/main/java/org/openapitools/client/model/BusinessCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessCustomerAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BusinessCustomerAllOfAttributes.java index fe23d4a0..04a5e08e 100644 --- a/src/main/java/org/openapitools/client/model/BusinessCustomerAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/BusinessCustomerAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessDebitCard.java b/src/main/java/org/openapitools/client/model/BusinessDebitCard.java index 037f3b65..2fb23dc2 100644 --- a/src/main/java/org/openapitools/client/model/BusinessDebitCard.java +++ b/src/main/java/org/openapitools/client/model/BusinessDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessDebitCardAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BusinessDebitCardAllOfAttributes.java index 2d6bc288..377a9982 100644 --- a/src/main/java/org/openapitools/client/model/BusinessDebitCardAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/BusinessDebitCardAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessNumberOfEmployees.java b/src/main/java/org/openapitools/client/model/BusinessNumberOfEmployees.java index 5865b80f..40f96cbd 100644 --- a/src/main/java/org/openapitools/client/model/BusinessNumberOfEmployees.java +++ b/src/main/java/org/openapitools/client/model/BusinessNumberOfEmployees.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessVertical.java b/src/main/java/org/openapitools/client/model/BusinessVertical.java index 4c17db8c..f19f9f59 100644 --- a/src/main/java/org/openapitools/client/model/BusinessVertical.java +++ b/src/main/java/org/openapitools/client/model/BusinessVertical.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessVirtualCreditCard.java b/src/main/java/org/openapitools/client/model/BusinessVirtualCreditCard.java index 14fb01d8..07f98a57 100644 --- a/src/main/java/org/openapitools/client/model/BusinessVirtualCreditCard.java +++ b/src/main/java/org/openapitools/client/model/BusinessVirtualCreditCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCard.java index b158334d..1cc19491 100644 --- a/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCard.java +++ b/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCardAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCardAllOfAttributes.java index c68282cf..76760e19 100644 --- a/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCardAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCardAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest14.java b/src/main/java/org/openapitools/client/model/CancelApplicationRequest.java similarity index 68% rename from src/main/java/org/openapitools/client/model/ExecuteRequest14.java rename to src/main/java/org/openapitools/client/model/CancelApplicationRequest.java index ff2e46ca..cb384bea 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest14.java +++ b/src/main/java/org/openapitools/client/model/CancelApplicationRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateCheckDeposit; +import org.openapitools.client.model.CancelApplicationRequestData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,18 +48,18 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest14 + * CancelApplicationRequest */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest14 { +public class CancelApplicationRequest { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private CreateCheckDeposit data; + private CancelApplicationRequestData data; - public ExecuteRequest14() { + public CancelApplicationRequest() { } - public ExecuteRequest14 data(CreateCheckDeposit data) { + public CancelApplicationRequest data(CancelApplicationRequestData data) { this.data = data; return this; @@ -70,12 +70,12 @@ public ExecuteRequest14 data(CreateCheckDeposit data) { * @return data **/ @javax.annotation.Nullable - public CreateCheckDeposit getData() { + public CancelApplicationRequestData getData() { return data; } - public void setData(CreateCheckDeposit data) { + public void setData(CancelApplicationRequestData data) { this.data = data; } @@ -89,8 +89,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest14 executeRequest14 = (ExecuteRequest14) o; - return Objects.equals(this.data, executeRequest14.data); + CancelApplicationRequest cancelApplicationRequest = (CancelApplicationRequest) o; + return Objects.equals(this.data, cancelApplicationRequest.data); } @Override @@ -101,7 +101,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest14 {\n"); + sb.append("class CancelApplicationRequest {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -135,26 +135,26 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest14 + * @throws IOException if the JSON Element is invalid with respect to CancelApplicationRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest14.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest14 is not found in the empty JSON string", ExecuteRequest14.openapiRequiredFields.toString())); + if (!CancelApplicationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CancelApplicationRequest is not found in the empty JSON string", CancelApplicationRequest.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest14.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest14` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CancelApplicationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CancelApplicationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `data` if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCheckDeposit.validateJsonElement(jsonObj.get("data")); + CancelApplicationRequestData.validateJsonElement(jsonObj.get("data")); } } @@ -162,22 +162,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest14.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest14' and its subtypes + if (!CancelApplicationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CancelApplicationRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest14.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CancelApplicationRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest14 value) throws IOException { + public void write(JsonWriter out, CancelApplicationRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest14 read(JsonReader in) throws IOException { + public CancelApplicationRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -188,18 +188,18 @@ public ExecuteRequest14 read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest14 given an JSON string + * Create an instance of CancelApplicationRequest given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest14 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest14 + * @return An instance of CancelApplicationRequest + * @throws IOException if the JSON string is invalid with respect to CancelApplicationRequest */ - public static ExecuteRequest14 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest14.class); + public static CancelApplicationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CancelApplicationRequest.class); } /** - * Convert an instance of ExecuteRequest14 to an JSON string + * Convert an instance of CancelApplicationRequest to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequestData.java b/src/main/java/org/openapitools/client/model/CancelApplicationRequestData.java similarity index 72% rename from src/main/java/org/openapitools/client/model/ExecuteRequestData.java rename to src/main/java/org/openapitools/client/model/CancelApplicationRequestData.java index d1a0ab5c..65368201 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequestData.java +++ b/src/main/java/org/openapitools/client/model/CancelApplicationRequestData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.ExecuteRequestDataAttributes; +import org.openapitools.client.model.CancelApplicationRequestDataAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,10 +48,10 @@ import org.openapitools.client.JSON; /** - * ExecuteRequestData + * CancelApplicationRequestData */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequestData { +public class CancelApplicationRequestData { /** * Gets or Sets type */ @@ -103,12 +103,12 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ExecuteRequestDataAttributes attributes; + private CancelApplicationRequestDataAttributes attributes; - public ExecuteRequestData() { + public CancelApplicationRequestData() { } - public ExecuteRequestData type(TypeEnum type) { + public CancelApplicationRequestData type(TypeEnum type) { this.type = type; return this; @@ -129,7 +129,7 @@ public void setType(TypeEnum type) { } - public ExecuteRequestData attributes(ExecuteRequestDataAttributes attributes) { + public CancelApplicationRequestData attributes(CancelApplicationRequestDataAttributes attributes) { this.attributes = attributes; return this; @@ -140,12 +140,12 @@ public ExecuteRequestData attributes(ExecuteRequestDataAttributes attributes) { * @return attributes **/ @javax.annotation.Nullable - public ExecuteRequestDataAttributes getAttributes() { + public CancelApplicationRequestDataAttributes getAttributes() { return attributes; } - public void setAttributes(ExecuteRequestDataAttributes attributes) { + public void setAttributes(CancelApplicationRequestDataAttributes attributes) { this.attributes = attributes; } @@ -159,9 +159,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequestData executeRequestData = (ExecuteRequestData) o; - return Objects.equals(this.type, executeRequestData.type) && - Objects.equals(this.attributes, executeRequestData.attributes); + CancelApplicationRequestData cancelApplicationRequestData = (CancelApplicationRequestData) o; + return Objects.equals(this.type, cancelApplicationRequestData.type) && + Objects.equals(this.attributes, cancelApplicationRequestData.attributes); } @Override @@ -172,7 +172,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequestData {\n"); + sb.append("class CancelApplicationRequestData {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append("}"); @@ -208,20 +208,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequestData + * @throws IOException if the JSON Element is invalid with respect to CancelApplicationRequestData */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequestData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequestData is not found in the empty JSON string", ExecuteRequestData.openapiRequiredFields.toString())); + if (!CancelApplicationRequestData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CancelApplicationRequestData is not found in the empty JSON string", CancelApplicationRequestData.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequestData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequestData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CancelApplicationRequestData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CancelApplicationRequestData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -230,7 +230,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `attributes` if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - ExecuteRequestDataAttributes.validateJsonElement(jsonObj.get("attributes")); + CancelApplicationRequestDataAttributes.validateJsonElement(jsonObj.get("attributes")); } } @@ -238,22 +238,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequestData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequestData' and its subtypes + if (!CancelApplicationRequestData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CancelApplicationRequestData' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequestData.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CancelApplicationRequestData.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequestData value) throws IOException { + public void write(JsonWriter out, CancelApplicationRequestData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequestData read(JsonReader in) throws IOException { + public CancelApplicationRequestData read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -264,18 +264,18 @@ public ExecuteRequestData read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequestData given an JSON string + * Create an instance of CancelApplicationRequestData given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequestData - * @throws IOException if the JSON string is invalid with respect to ExecuteRequestData + * @return An instance of CancelApplicationRequestData + * @throws IOException if the JSON string is invalid with respect to CancelApplicationRequestData */ - public static ExecuteRequestData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequestData.class); + public static CancelApplicationRequestData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CancelApplicationRequestData.class); } /** - * Convert an instance of ExecuteRequestData to an JSON string + * Convert an instance of CancelApplicationRequestData to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequestDataAttributes.java b/src/main/java/org/openapitools/client/model/CancelApplicationRequestDataAttributes.java similarity index 68% rename from src/main/java/org/openapitools/client/model/ExecuteRequestDataAttributes.java rename to src/main/java/org/openapitools/client/model/CancelApplicationRequestDataAttributes.java index 0c62573d..d5c74e72 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequestDataAttributes.java +++ b/src/main/java/org/openapitools/client/model/CancelApplicationRequestDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,18 +47,18 @@ import org.openapitools.client.JSON; /** - * ExecuteRequestDataAttributes + * CancelApplicationRequestDataAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequestDataAttributes { +public class CancelApplicationRequestDataAttributes { public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) private String reason; - public ExecuteRequestDataAttributes() { + public CancelApplicationRequestDataAttributes() { } - public ExecuteRequestDataAttributes reason(String reason) { + public CancelApplicationRequestDataAttributes reason(String reason) { this.reason = reason; return this; @@ -88,8 +88,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequestDataAttributes executeRequestDataAttributes = (ExecuteRequestDataAttributes) o; - return Objects.equals(this.reason, executeRequestDataAttributes.reason); + CancelApplicationRequestDataAttributes cancelApplicationRequestDataAttributes = (CancelApplicationRequestDataAttributes) o; + return Objects.equals(this.reason, cancelApplicationRequestDataAttributes.reason); } @Override @@ -100,7 +100,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequestDataAttributes {\n"); + sb.append("class CancelApplicationRequestDataAttributes {\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append("}"); return sb.toString(); @@ -134,20 +134,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequestDataAttributes + * @throws IOException if the JSON Element is invalid with respect to CancelApplicationRequestDataAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequestDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequestDataAttributes is not found in the empty JSON string", ExecuteRequestDataAttributes.openapiRequiredFields.toString())); + if (!CancelApplicationRequestDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CancelApplicationRequestDataAttributes is not found in the empty JSON string", CancelApplicationRequestDataAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequestDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequestDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CancelApplicationRequestDataAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CancelApplicationRequestDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -160,22 +160,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequestDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequestDataAttributes' and its subtypes + if (!CancelApplicationRequestDataAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CancelApplicationRequestDataAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequestDataAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CancelApplicationRequestDataAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequestDataAttributes value) throws IOException { + public void write(JsonWriter out, CancelApplicationRequestDataAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequestDataAttributes read(JsonReader in) throws IOException { + public CancelApplicationRequestDataAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -186,18 +186,18 @@ public ExecuteRequestDataAttributes read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequestDataAttributes given an JSON string + * Create an instance of CancelApplicationRequestDataAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequestDataAttributes - * @throws IOException if the JSON string is invalid with respect to ExecuteRequestDataAttributes + * @return An instance of CancelApplicationRequestDataAttributes + * @throws IOException if the JSON string is invalid with respect to CancelApplicationRequestDataAttributes */ - public static ExecuteRequestDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequestDataAttributes.class); + public static CancelApplicationRequestDataAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CancelApplicationRequestDataAttributes.class); } /** - * Convert an instance of ExecuteRequestDataAttributes to an JSON string + * Convert an instance of CancelApplicationRequestDataAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/Card.java b/src/main/java/org/openapitools/client/model/Card.java index 97943a03..c0a3858a 100644 --- a/src/main/java/org/openapitools/client/model/Card.java +++ b/src/main/java/org/openapitools/client/model/Card.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CardLevelLimits.java b/src/main/java/org/openapitools/client/model/CardLevelLimits.java index 869de9e9..2608a992 100644 --- a/src/main/java/org/openapitools/client/model/CardLevelLimits.java +++ b/src/main/java/org/openapitools/client/model/CardLevelLimits.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CardRelationship.java b/src/main/java/org/openapitools/client/model/CardRelationship.java index 74f2001a..080305b2 100644 --- a/src/main/java/org/openapitools/client/model/CardRelationship.java +++ b/src/main/java/org/openapitools/client/model/CardRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CardRelationships.java b/src/main/java/org/openapitools/client/model/CardRelationships.java index 14185de9..77f71220 100644 --- a/src/main/java/org/openapitools/client/model/CardRelationships.java +++ b/src/main/java/org/openapitools/client/model/CardRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CardRelationshipsAccount.java b/src/main/java/org/openapitools/client/model/CardRelationshipsAccount.java index 849a6610..90bde76c 100644 --- a/src/main/java/org/openapitools/client/model/CardRelationshipsAccount.java +++ b/src/main/java/org/openapitools/client/model/CardRelationshipsAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CardTransaction.java b/src/main/java/org/openapitools/client/model/CardTransaction.java index c7c6510a..db0d7029 100644 --- a/src/main/java/org/openapitools/client/model/CardTransaction.java +++ b/src/main/java/org/openapitools/client/model/CardTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CardTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CardTransactionAllOfAttributes.java index cb841717..cf2402ea 100644 --- a/src/main/java/org/openapitools/client/model/CardTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/CardTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequest.java index 84d2737a..87d5ae9d 100644 --- a/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequest.java +++ b/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequestAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequestAllOfAttributes.java index 7f0680c9..fa6fcc23 100644 --- a/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequestAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequestAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CardVerificationData.java b/src/main/java/org/openapitools/client/model/CardVerificationData.java index 67821e46..22214f6e 100644 --- a/src/main/java/org/openapitools/client/model/CardVerificationData.java +++ b/src/main/java/org/openapitools/client/model/CardVerificationData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CashDepositTransaction.java b/src/main/java/org/openapitools/client/model/CashDepositTransaction.java index 09695e5d..3728a418 100644 --- a/src/main/java/org/openapitools/client/model/CashDepositTransaction.java +++ b/src/main/java/org/openapitools/client/model/CashDepositTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CashDepositTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CashDepositTransactionAllOfAttributes.java index 9ed17f61..3838be55 100644 --- a/src/main/java/org/openapitools/client/model/CashDepositTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/CashDepositTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CashFlow.java b/src/main/java/org/openapitools/client/model/CashFlow.java index 05e1688e..35ed607e 100644 --- a/src/main/java/org/openapitools/client/model/CashFlow.java +++ b/src/main/java/org/openapitools/client/model/CashFlow.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ChargebackRelationship.java b/src/main/java/org/openapitools/client/model/ChargebackRelationship.java index 19b4b4a7..b13da9d3 100644 --- a/src/main/java/org/openapitools/client/model/ChargebackRelationship.java +++ b/src/main/java/org/openapitools/client/model/ChargebackRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ChargebackRelationshipData.java b/src/main/java/org/openapitools/client/model/ChargebackRelationshipData.java index a087a6da..8f4974c1 100644 --- a/src/main/java/org/openapitools/client/model/ChargebackRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/ChargebackRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ChargebackTransaction.java b/src/main/java/org/openapitools/client/model/ChargebackTransaction.java index d0b7cc3a..904b06f1 100644 --- a/src/main/java/org/openapitools/client/model/ChargebackTransaction.java +++ b/src/main/java/org/openapitools/client/model/ChargebackTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ChargebackTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ChargebackTransactionAllOfAttributes.java index b23dbc67..9382d1f3 100644 --- a/src/main/java/org/openapitools/client/model/ChargebackTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/ChargebackTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDeposit.java b/src/main/java/org/openapitools/client/model/CheckDeposit.java index 0d0b5004..b5a8ac14 100644 --- a/src/main/java/org/openapitools/client/model/CheckDeposit.java +++ b/src/main/java/org/openapitools/client/model/CheckDeposit.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDepositAttributes.java b/src/main/java/org/openapitools/client/model/CheckDepositAttributes.java index c4dc6da0..f582fa7d 100644 --- a/src/main/java/org/openapitools/client/model/CheckDepositAttributes.java +++ b/src/main/java/org/openapitools/client/model/CheckDepositAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationship.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationship.java index c342f0ea..fa4bf9ca 100644 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationship.java +++ b/src/main/java/org/openapitools/client/model/CheckDepositRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipData.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationshipData.java index 3b1adf97..136d4855 100644 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/CheckDepositRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationships.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationships.java index 62960fd6..b4784bd0 100644 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationships.java +++ b/src/main/java/org/openapitools/client/model/CheckDepositRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccount.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccount.java index 49998871..145c1c5f 100644 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccount.java +++ b/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccountData.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccountData.java index 05fdac1d..67d1077d 100644 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccountData.java +++ b/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDepositStatus.java b/src/main/java/org/openapitools/client/model/CheckDepositStatus.java index b4ac5e09..ddb67383 100644 --- a/src/main/java/org/openapitools/client/model/CheckDepositStatus.java +++ b/src/main/java/org/openapitools/client/model/CheckDepositStatus.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDepositTransaction.java b/src/main/java/org/openapitools/client/model/CheckDepositTransaction.java index b6b510db..ba2da6c9 100644 --- a/src/main/java/org/openapitools/client/model/CheckDepositTransaction.java +++ b/src/main/java/org/openapitools/client/model/CheckDepositTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckDepositTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CheckDepositTransactionAllOfAttributes.java index d15b9b93..efa80b10 100644 --- a/src/main/java/org/openapitools/client/model/CheckDepositTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/CheckDepositTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckPayment.java b/src/main/java/org/openapitools/client/model/CheckPayment.java index dab940f0..51f80c2e 100644 --- a/src/main/java/org/openapitools/client/model/CheckPayment.java +++ b/src/main/java/org/openapitools/client/model/CheckPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CheckPaymentAttributes.java index 36f1628b..bc8d0fcf 100644 --- a/src/main/java/org/openapitools/client/model/CheckPaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/CheckPaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentAttributesCounterparty.java b/src/main/java/org/openapitools/client/model/CheckPaymentAttributesCounterparty.java index a7b07e23..bb3ae032 100644 --- a/src/main/java/org/openapitools/client/model/CheckPaymentAttributesCounterparty.java +++ b/src/main/java/org/openapitools/client/model/CheckPaymentAttributesCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentRelationship.java b/src/main/java/org/openapitools/client/model/CheckPaymentRelationship.java index b152f2f2..63b94830 100644 --- a/src/main/java/org/openapitools/client/model/CheckPaymentRelationship.java +++ b/src/main/java/org/openapitools/client/model/CheckPaymentRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentRelationships.java b/src/main/java/org/openapitools/client/model/CheckPaymentRelationships.java index d0e33bd9..5cce9363 100644 --- a/src/main/java/org/openapitools/client/model/CheckPaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/CheckPaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentTransaction.java b/src/main/java/org/openapitools/client/model/CheckPaymentTransaction.java index 9db113e4..a69cd520 100644 --- a/src/main/java/org/openapitools/client/model/CheckPaymentTransaction.java +++ b/src/main/java/org/openapitools/client/model/CheckPaymentTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CloseAccountRequest.java b/src/main/java/org/openapitools/client/model/CloseAccountRequest.java index 0d7136b2..cc15fc3d 100644 --- a/src/main/java/org/openapitools/client/model/CloseAccountRequest.java +++ b/src/main/java/org/openapitools/client/model/CloseAccountRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CloseAccountRequestAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,103 +51,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CloseAccountRequest { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CREDITACCOUNTCLOSE("creditAccountClose"), - - DEPOSITACCOUNTCLOSE("depositAccountClose"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CloseAccountRequestAttributes attributes; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CloseAccountRequest data; public CloseAccountRequest() { } - public CloseAccountRequest type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CloseAccountRequest attributes(CloseAccountRequestAttributes attributes) { + public CloseAccountRequest data(CloseAccountRequest data) { - this.attributes = attributes; + this.data = data; return this; } /** - * Get attributes - * @return attributes + * Get data + * @return data **/ @javax.annotation.Nullable - public CloseAccountRequestAttributes getAttributes() { - return attributes; + public CloseAccountRequest getData() { + return data; } - public void setAttributes(CloseAccountRequestAttributes attributes) { - this.attributes = attributes; + public void setData(CloseAccountRequest data) { + this.data = data; } @@ -162,21 +89,19 @@ public boolean equals(Object o) { return false; } CloseAccountRequest closeAccountRequest = (CloseAccountRequest) o; - return Objects.equals(this.type, closeAccountRequest.type) && - Objects.equals(this.attributes, closeAccountRequest.attributes); + return Objects.equals(this.data, closeAccountRequest.data); } @Override public int hashCode() { - return Objects.hash(type, attributes); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CloseAccountRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -199,8 +124,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -227,12 +151,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CloseAccountRequestAttributes.validateJsonElement(jsonObj.get("attributes")); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CloseAccountRequest.validateJsonElement(jsonObj.get("data")); } } diff --git a/src/main/java/org/openapitools/client/model/CloseAccountRequestAttributes.java b/src/main/java/org/openapitools/client/model/CloseAccountRequestAttributes.java index c237cf1c..8e353233 100644 --- a/src/main/java/org/openapitools/client/model/CloseAccountRequestAttributes.java +++ b/src/main/java/org/openapitools/client/model/CloseAccountRequestAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Contact.java b/src/main/java/org/openapitools/client/model/Contact.java index cef3fc5e..01738508 100644 --- a/src/main/java/org/openapitools/client/model/Contact.java +++ b/src/main/java/org/openapitools/client/model/Contact.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Coordinates.java b/src/main/java/org/openapitools/client/model/Coordinates.java index e86667ae..75de3b5f 100644 --- a/src/main/java/org/openapitools/client/model/Coordinates.java +++ b/src/main/java/org/openapitools/client/model/Coordinates.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Counterparty.java b/src/main/java/org/openapitools/client/model/Counterparty.java index e6bded7f..6c1cc602 100644 --- a/src/main/java/org/openapitools/client/model/Counterparty.java +++ b/src/main/java/org/openapitools/client/model/Counterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Counterparty1.java b/src/main/java/org/openapitools/client/model/Counterparty1.java index f01f5de2..4a165468 100644 --- a/src/main/java/org/openapitools/client/model/Counterparty1.java +++ b/src/main/java/org/openapitools/client/model/Counterparty1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Counterparty1Attributes.java b/src/main/java/org/openapitools/client/model/Counterparty1Attributes.java index 5642acaf..f682f6f6 100644 --- a/src/main/java/org/openapitools/client/model/Counterparty1Attributes.java +++ b/src/main/java/org/openapitools/client/model/Counterparty1Attributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Counterparty2.java b/src/main/java/org/openapitools/client/model/Counterparty2.java index 6bda26dd..43f30c44 100644 --- a/src/main/java/org/openapitools/client/model/Counterparty2.java +++ b/src/main/java/org/openapitools/client/model/Counterparty2.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship.java b/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship.java index e9238b37..9f2b1517 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship1.java b/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship1.java index d2ff0d10..7fe4a3b7 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship1.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationshipData.java b/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationshipData.java index 324094af..df9ae4fb 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalance.java b/src/main/java/org/openapitools/client/model/CounterpartyBalance.java index 9c25da7a..205cb178 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalance.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyBalance.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalanceAttributes.java b/src/main/java/org/openapitools/client/model/CounterpartyBalanceAttributes.java index a5b15f29..14ef0f29 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalanceAttributes.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyBalanceAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationships.java b/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationships.java index 56c5b080..7db99b91 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationships.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterparty.java b/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterparty.java index 3dcd1b68..6fe134e3 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterparty.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterpartyData.java b/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterpartyData.java index 7a4db3e8..a605c92b 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterpartyData.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterpartyData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyCustomerRelationship.java b/src/main/java/org/openapitools/client/model/CounterpartyCustomerRelationship.java index 5038df82..f3a5b445 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyCustomerRelationship.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyCustomerRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyRelationship.java b/src/main/java/org/openapitools/client/model/CounterpartyRelationship.java index d3e07742..d0de6427 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyRelationship.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyRelationshipData.java b/src/main/java/org/openapitools/client/model/CounterpartyRelationshipData.java index def1a579..04ac7ed0 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CounterpartyRelationships.java b/src/main/java/org/openapitools/client/model/CounterpartyRelationships.java index 02d15592..50e2ac66 100644 --- a/src/main/java/org/openapitools/client/model/CounterpartyRelationships.java +++ b/src/main/java/org/openapitools/client/model/CounterpartyRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAccount.java b/src/main/java/org/openapitools/client/model/CreateAccount.java index 97687a44..550c5db3 100644 --- a/src/main/java/org/openapitools/client/model/CreateAccount.java +++ b/src/main/java/org/openapitools/client/model/CreateAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAccountData.java b/src/main/java/org/openapitools/client/model/CreateAccountData.java index 98ed331f..57b4857f 100644 --- a/src/main/java/org/openapitools/client/model/CreateAccountData.java +++ b/src/main/java/org/openapitools/client/model/CreateAccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchCounterparty.java b/src/main/java/org/openapitools/client/model/CreateAchCounterparty.java index a18ee49c..f08db7a8 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchCounterparty.java +++ b/src/main/java/org/openapitools/client/model/CreateAchCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchCounterpartyAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchCounterpartyAttributes.java index c4ec7e58..6dd53377 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchCounterpartyAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateAchCounterpartyAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchPayment.java b/src/main/java/org/openapitools/client/model/CreateAchPayment.java index facba57f..349a70e7 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchPayment.java +++ b/src/main/java/org/openapitools/client/model/CreateAchPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentAttributes.java index 46a303ba..35649f34 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateAchPaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterparty.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterparty.java index dde9d088..24dcc3e9 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterparty.java +++ b/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyAttributes.java index 2fef820e..a74c662d 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyRelationships.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyRelationships.java index d2174190..6101689b 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaid.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaid.java index fcf107ea..247101fb 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaid.java +++ b/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaid.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaidAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaidAttributes.java index 19154f81..deaea9d6 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaidAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaidAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentRelationships.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentRelationships.java index c271d441..716dc845 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateAchPaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchRepayment.java b/src/main/java/org/openapitools/client/model/CreateAchRepayment.java index 8a2a808b..04e3543d 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchRepayment.java +++ b/src/main/java/org/openapitools/client/model/CreateAchRepayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchRepaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchRepaymentAttributes.java index 4fa6ecfb..32bade61 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchRepaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateAchRepaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateAchRepaymentRelationships.java b/src/main/java/org/openapitools/client/model/CreateAchRepaymentRelationships.java index 668bece8..fc99edfb 100644 --- a/src/main/java/org/openapitools/client/model/CreateAchRepaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateAchRepaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateApiToken.java b/src/main/java/org/openapitools/client/model/CreateApiToken.java index 9096f4e1..9502f5a2 100644 --- a/src/main/java/org/openapitools/client/model/CreateApiToken.java +++ b/src/main/java/org/openapitools/client/model/CreateApiToken.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateApiTokenAttributes; +import org.openapitools.client.model.CreateApiTokenData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,56 +52,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateApiToken { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "apiToken"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateApiTokenAttributes attributes; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateApiTokenData data; public CreateApiToken() { } - public CreateApiToken type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateApiToken attributes(CreateApiTokenAttributes attributes) { + public CreateApiToken data(CreateApiTokenData data) { - this.attributes = attributes; + this.data = data; return this; } /** - * Get attributes - * @return attributes + * Get data + * @return data **/ - @javax.annotation.Nonnull - public CreateApiTokenAttributes getAttributes() { - return attributes; + @javax.annotation.Nullable + public CreateApiTokenData getData() { + return data; } - public void setAttributes(CreateApiTokenAttributes attributes) { - this.attributes = attributes; + public void setData(CreateApiTokenData data) { + this.data = data; } @@ -115,21 +90,19 @@ public boolean equals(Object o) { return false; } CreateApiToken createApiToken = (CreateApiToken) o; - return Objects.equals(this.type, createApiToken.type) && - Objects.equals(this.attributes, createApiToken.attributes); + return Objects.equals(this.data, createApiToken.data); } @Override public int hashCode() { - return Objects.hash(type, attributes); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateApiToken {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -152,13 +125,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); } /** @@ -181,19 +151,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiToken` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateApiToken.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateApiTokenData.validateJsonElement(jsonObj.get("data")); } - // validate the required field `attributes` - CreateApiTokenAttributes.validateJsonElement(jsonObj.get("attributes")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/CreateApiTokenData.java b/src/main/java/org/openapitools/client/model/CreateApiTokenData.java new file mode 100644 index 00000000..7c3c9690 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateApiTokenData.java @@ -0,0 +1,248 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateApiTokenDataAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * CreateApiTokenData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApiTokenData { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "apiToken"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateApiTokenDataAttributes attributes; + + public CreateApiTokenData() { + } + + public CreateApiTokenData type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public CreateApiTokenData attributes(CreateApiTokenDataAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nonnull + public CreateApiTokenDataAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(CreateApiTokenDataAttributes attributes) { + this.attributes = attributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApiTokenData createApiTokenData = (CreateApiTokenData) o; + return Objects.equals(this.type, createApiTokenData.type) && + Objects.equals(this.attributes, createApiTokenData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApiTokenData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateApiTokenData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateApiTokenData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiTokenData is not found in the empty JSON string", CreateApiTokenData.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateApiTokenData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiTokenData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateApiTokenData.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `attributes` + CreateApiTokenDataAttributes.validateJsonElement(jsonObj.get("attributes")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateApiTokenData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateApiTokenData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateApiTokenData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateApiTokenData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateApiTokenData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateApiTokenData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateApiTokenData + * @throws IOException if the JSON string is invalid with respect to CreateApiTokenData + */ + public static CreateApiTokenData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateApiTokenData.class); + } + + /** + * Convert an instance of CreateApiTokenData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateApiTokenAttributes.java b/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributes.java similarity index 74% rename from src/main/java/org/openapitools/client/model/CreateApiTokenAttributes.java rename to src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributes.java index 01d6efb7..238a77ac 100644 --- a/src/main/java/org/openapitools/client/model/CreateApiTokenAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,7 +24,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.client.model.CreateApiTokenAttributesResourcesInner; +import org.openapitools.client.model.CreateApiTokenDataAttributesResourcesInner; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -51,10 +51,10 @@ import org.openapitools.client.JSON; /** - * CreateApiTokenAttributes + * CreateApiTokenDataAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApiTokenAttributes { +public class CreateApiTokenDataAttributes { public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) private String scope; @@ -73,12 +73,12 @@ public class CreateApiTokenAttributes { public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; + private List resources; - public CreateApiTokenAttributes() { + public CreateApiTokenDataAttributes() { } - public CreateApiTokenAttributes scope(String scope) { + public CreateApiTokenDataAttributes scope(String scope) { this.scope = scope; return this; @@ -99,7 +99,7 @@ public void setScope(String scope) { } - public CreateApiTokenAttributes description(String description) { + public CreateApiTokenDataAttributes description(String description) { this.description = description; return this; @@ -120,7 +120,7 @@ public void setDescription(String description) { } - public CreateApiTokenAttributes expiration(OffsetDateTime expiration) { + public CreateApiTokenDataAttributes expiration(OffsetDateTime expiration) { this.expiration = expiration; return this; @@ -141,7 +141,7 @@ public void setExpiration(OffsetDateTime expiration) { } - public CreateApiTokenAttributes sourceIp(String sourceIp) { + public CreateApiTokenDataAttributes sourceIp(String sourceIp) { this.sourceIp = sourceIp; return this; @@ -162,13 +162,13 @@ public void setSourceIp(String sourceIp) { } - public CreateApiTokenAttributes resources(List resources) { + public CreateApiTokenDataAttributes resources(List resources) { this.resources = resources; return this; } - public CreateApiTokenAttributes addResourcesItem(CreateApiTokenAttributesResourcesInner resourcesItem) { + public CreateApiTokenDataAttributes addResourcesItem(CreateApiTokenDataAttributesResourcesInner resourcesItem) { if (this.resources == null) { this.resources = new ArrayList<>(); } @@ -181,12 +181,12 @@ public CreateApiTokenAttributes addResourcesItem(CreateApiTokenAttributesResourc * @return resources **/ @javax.annotation.Nullable - public List getResources() { + public List getResources() { return resources; } - public void setResources(List resources) { + public void setResources(List resources) { this.resources = resources; } @@ -200,12 +200,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateApiTokenAttributes createApiTokenAttributes = (CreateApiTokenAttributes) o; - return Objects.equals(this.scope, createApiTokenAttributes.scope) && - Objects.equals(this.description, createApiTokenAttributes.description) && - Objects.equals(this.expiration, createApiTokenAttributes.expiration) && - Objects.equals(this.sourceIp, createApiTokenAttributes.sourceIp) && - Objects.equals(this.resources, createApiTokenAttributes.resources); + CreateApiTokenDataAttributes createApiTokenDataAttributes = (CreateApiTokenDataAttributes) o; + return Objects.equals(this.scope, createApiTokenDataAttributes.scope) && + Objects.equals(this.description, createApiTokenDataAttributes.description) && + Objects.equals(this.expiration, createApiTokenDataAttributes.expiration) && + Objects.equals(this.sourceIp, createApiTokenDataAttributes.sourceIp) && + Objects.equals(this.resources, createApiTokenDataAttributes.resources); } @Override @@ -216,7 +216,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateApiTokenAttributes {\n"); + sb.append("class CreateApiTokenDataAttributes {\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); @@ -260,25 +260,25 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApiTokenAttributes + * @throws IOException if the JSON Element is invalid with respect to CreateApiTokenDataAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateApiTokenAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiTokenAttributes is not found in the empty JSON string", CreateApiTokenAttributes.openapiRequiredFields.toString())); + if (!CreateApiTokenDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiTokenDataAttributes is not found in the empty JSON string", CreateApiTokenDataAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateApiTokenAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiTokenAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateApiTokenDataAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiTokenDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateApiTokenAttributes.openapiRequiredFields) { + for (String requiredField : CreateApiTokenDataAttributes.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -303,7 +303,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `resources` (array) for (int i = 0; i < jsonArrayresources.size(); i++) { - CreateApiTokenAttributesResourcesInner.validateJsonElement(jsonArrayresources.get(i)); + CreateApiTokenDataAttributesResourcesInner.validateJsonElement(jsonArrayresources.get(i)); }; } } @@ -313,22 +313,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApiTokenAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApiTokenAttributes' and its subtypes + if (!CreateApiTokenDataAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateApiTokenDataAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApiTokenAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateApiTokenDataAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateApiTokenAttributes value) throws IOException { + public void write(JsonWriter out, CreateApiTokenDataAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateApiTokenAttributes read(JsonReader in) throws IOException { + public CreateApiTokenDataAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -339,18 +339,18 @@ public CreateApiTokenAttributes read(JsonReader in) throws IOException { } /** - * Create an instance of CreateApiTokenAttributes given an JSON string + * Create an instance of CreateApiTokenDataAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of CreateApiTokenAttributes - * @throws IOException if the JSON string is invalid with respect to CreateApiTokenAttributes + * @return An instance of CreateApiTokenDataAttributes + * @throws IOException if the JSON string is invalid with respect to CreateApiTokenDataAttributes */ - public static CreateApiTokenAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApiTokenAttributes.class); + public static CreateApiTokenDataAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateApiTokenDataAttributes.class); } /** - * Convert an instance of CreateApiTokenAttributes to an JSON string + * Convert an instance of CreateApiTokenDataAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateApiTokenAttributesResourcesInner.java b/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributesResourcesInner.java similarity index 74% rename from src/main/java/org/openapitools/client/model/CreateApiTokenAttributesResourcesInner.java rename to src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributesResourcesInner.java index e3947360..d4a4146d 100644 --- a/src/main/java/org/openapitools/client/model/CreateApiTokenAttributesResourcesInner.java +++ b/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributesResourcesInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,10 +49,10 @@ import org.openapitools.client.JSON; /** - * CreateApiTokenAttributesResourcesInner + * CreateApiTokenDataAttributesResourcesInner */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApiTokenAttributesResourcesInner { +public class CreateApiTokenDataAttributesResourcesInner { /** * Gets or Sets type */ @@ -108,10 +108,10 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_IDS) private List ids; - public CreateApiTokenAttributesResourcesInner() { + public CreateApiTokenDataAttributesResourcesInner() { } - public CreateApiTokenAttributesResourcesInner type(TypeEnum type) { + public CreateApiTokenDataAttributesResourcesInner type(TypeEnum type) { this.type = type; return this; @@ -132,13 +132,13 @@ public void setType(TypeEnum type) { } - public CreateApiTokenAttributesResourcesInner ids(List ids) { + public CreateApiTokenDataAttributesResourcesInner ids(List ids) { this.ids = ids; return this; } - public CreateApiTokenAttributesResourcesInner addIdsItem(String idsItem) { + public CreateApiTokenDataAttributesResourcesInner addIdsItem(String idsItem) { if (this.ids == null) { this.ids = new ArrayList<>(); } @@ -170,9 +170,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateApiTokenAttributesResourcesInner createApiTokenAttributesResourcesInner = (CreateApiTokenAttributesResourcesInner) o; - return Objects.equals(this.type, createApiTokenAttributesResourcesInner.type) && - Objects.equals(this.ids, createApiTokenAttributesResourcesInner.ids); + CreateApiTokenDataAttributesResourcesInner createApiTokenDataAttributesResourcesInner = (CreateApiTokenDataAttributesResourcesInner) o; + return Objects.equals(this.type, createApiTokenDataAttributesResourcesInner.type) && + Objects.equals(this.ids, createApiTokenDataAttributesResourcesInner.ids); } @Override @@ -183,7 +183,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateApiTokenAttributesResourcesInner {\n"); + sb.append("class CreateApiTokenDataAttributesResourcesInner {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" ids: ").append(toIndentedString(ids)).append("\n"); sb.append("}"); @@ -219,20 +219,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApiTokenAttributesResourcesInner + * @throws IOException if the JSON Element is invalid with respect to CreateApiTokenDataAttributesResourcesInner */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateApiTokenAttributesResourcesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiTokenAttributesResourcesInner is not found in the empty JSON string", CreateApiTokenAttributesResourcesInner.openapiRequiredFields.toString())); + if (!CreateApiTokenDataAttributesResourcesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiTokenDataAttributesResourcesInner is not found in the empty JSON string", CreateApiTokenDataAttributesResourcesInner.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateApiTokenAttributesResourcesInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiTokenAttributesResourcesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateApiTokenDataAttributesResourcesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiTokenDataAttributesResourcesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -249,22 +249,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApiTokenAttributesResourcesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApiTokenAttributesResourcesInner' and its subtypes + if (!CreateApiTokenDataAttributesResourcesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateApiTokenDataAttributesResourcesInner' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApiTokenAttributesResourcesInner.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateApiTokenDataAttributesResourcesInner.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateApiTokenAttributesResourcesInner value) throws IOException { + public void write(JsonWriter out, CreateApiTokenDataAttributesResourcesInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateApiTokenAttributesResourcesInner read(JsonReader in) throws IOException { + public CreateApiTokenDataAttributesResourcesInner read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -275,18 +275,18 @@ public CreateApiTokenAttributesResourcesInner read(JsonReader in) throws IOExcep } /** - * Create an instance of CreateApiTokenAttributesResourcesInner given an JSON string + * Create an instance of CreateApiTokenDataAttributesResourcesInner given an JSON string * * @param jsonString JSON string - * @return An instance of CreateApiTokenAttributesResourcesInner - * @throws IOException if the JSON string is invalid with respect to CreateApiTokenAttributesResourcesInner + * @return An instance of CreateApiTokenDataAttributesResourcesInner + * @throws IOException if the JSON string is invalid with respect to CreateApiTokenDataAttributesResourcesInner */ - public static CreateApiTokenAttributesResourcesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApiTokenAttributesResourcesInner.class); + public static CreateApiTokenDataAttributesResourcesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateApiTokenDataAttributesResourcesInner.class); } /** - * Convert an instance of CreateApiTokenAttributesResourcesInner to an JSON string + * Convert an instance of CreateApiTokenDataAttributesResourcesInner to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateApplication.java b/src/main/java/org/openapitools/client/model/CreateApplication.java index f92f96c2..45ea9884 100644 --- a/src/main/java/org/openapitools/client/model/CreateApplication.java +++ b/src/main/java/org/openapitools/client/model/CreateApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationData.java b/src/main/java/org/openapitools/client/model/CreateApplicationData.java index d0f3290d..844c8b7c 100644 --- a/src/main/java/org/openapitools/client/model/CreateApplicationData.java +++ b/src/main/java/org/openapitools/client/model/CreateApplicationData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationForm.java b/src/main/java/org/openapitools/client/model/CreateApplicationForm.java index 61061b65..e20b96c7 100644 --- a/src/main/java/org/openapitools/client/model/CreateApplicationForm.java +++ b/src/main/java/org/openapitools/client/model/CreateApplicationForm.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,8 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateApplicationFormAttributes; -import org.openapitools.client.model.CreateApplicationFormRelationships; +import org.openapitools.client.model.CreateApplicationFormData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,81 +52,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateApplicationForm { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "applicationForm"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateApplicationFormAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateApplicationFormRelationships relationships; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateApplicationFormData data; public CreateApplicationForm() { } - public CreateApplicationForm type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateApplicationForm attributes(CreateApplicationFormAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CreateApplicationFormAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateApplicationFormAttributes attributes) { - this.attributes = attributes; - } - - - public CreateApplicationForm relationships(CreateApplicationFormRelationships relationships) { + public CreateApplicationForm data(CreateApplicationFormData data) { - this.relationships = relationships; + this.data = data; return this; } /** - * Get relationships - * @return relationships + * Get data + * @return data **/ @javax.annotation.Nullable - public CreateApplicationFormRelationships getRelationships() { - return relationships; + public CreateApplicationFormData getData() { + return data; } - public void setRelationships(CreateApplicationFormRelationships relationships) { - this.relationships = relationships; + public void setData(CreateApplicationFormData data) { + this.data = data; } @@ -141,23 +90,19 @@ public boolean equals(Object o) { return false; } CreateApplicationForm createApplicationForm = (CreateApplicationForm) o; - return Objects.equals(this.type, createApplicationForm.type) && - Objects.equals(this.attributes, createApplicationForm.attributes) && - Objects.equals(this.relationships, createApplicationForm.relationships); + return Objects.equals(this.data, createApplicationForm.data); } @Override public int hashCode() { - return Objects.hash(type, attributes, relationships); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateApplicationForm {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -180,13 +125,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); } /** @@ -209,24 +151,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApplicationForm` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateApplicationForm.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CreateApplicationFormAttributes.validateJsonElement(jsonObj.get("attributes")); - } - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - CreateApplicationFormRelationships.validateJsonElement(jsonObj.get("relationships")); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateApplicationFormData.validateJsonElement(jsonObj.get("data")); } } diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationFormData.java b/src/main/java/org/openapitools/client/model/CreateApplicationFormData.java new file mode 100644 index 00000000..fbe6b349 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateApplicationFormData.java @@ -0,0 +1,282 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateApplicationFormDataAttributes; +import org.openapitools.client.model.CreateApplicationFormRelationships; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * CreateApplicationFormData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApplicationFormData { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "applicationForm"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateApplicationFormDataAttributes attributes; + + public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; + @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) + private CreateApplicationFormRelationships relationships; + + public CreateApplicationFormData() { + } + + public CreateApplicationFormData type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public CreateApplicationFormData attributes(CreateApplicationFormDataAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + public CreateApplicationFormDataAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(CreateApplicationFormDataAttributes attributes) { + this.attributes = attributes; + } + + + public CreateApplicationFormData relationships(CreateApplicationFormRelationships relationships) { + + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @javax.annotation.Nullable + public CreateApplicationFormRelationships getRelationships() { + return relationships; + } + + + public void setRelationships(CreateApplicationFormRelationships relationships) { + this.relationships = relationships; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApplicationFormData createApplicationFormData = (CreateApplicationFormData) o; + return Objects.equals(this.type, createApplicationFormData.type) && + Objects.equals(this.attributes, createApplicationFormData.attributes) && + Objects.equals(this.relationships, createApplicationFormData.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApplicationFormData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + openapiFields.add("relationships"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateApplicationFormData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateApplicationFormData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApplicationFormData is not found in the empty JSON string", CreateApplicationFormData.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateApplicationFormData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApplicationFormData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateApplicationFormData.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CreateApplicationFormDataAttributes.validateJsonElement(jsonObj.get("attributes")); + } + // validate the optional field `relationships` + if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { + CreateApplicationFormRelationships.validateJsonElement(jsonObj.get("relationships")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateApplicationFormData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateApplicationFormData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateApplicationFormData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateApplicationFormData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateApplicationFormData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateApplicationFormData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateApplicationFormData + * @throws IOException if the JSON string is invalid with respect to CreateApplicationFormData + */ + public static CreateApplicationFormData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateApplicationFormData.class); + } + + /** + * Convert an instance of CreateApplicationFormData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationFormAttributes.java b/src/main/java/org/openapitools/client/model/CreateApplicationFormDataAttributes.java similarity index 75% rename from src/main/java/org/openapitools/client/model/CreateApplicationFormAttributes.java rename to src/main/java/org/openapitools/client/model/CreateApplicationFormDataAttributes.java index e2af787a..5396b6d2 100644 --- a/src/main/java/org/openapitools/client/model/CreateApplicationFormAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateApplicationFormDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.client.model.Prefilled; +import org.openapitools.client.model.ApplicationFormPrefill; +import org.openapitools.client.model.ApplicationFormSettingsOverride; import org.openapitools.client.model.RequireIdVerification; -import org.openapitools.client.model.SettingsOverride; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,25 +52,21 @@ import org.openapitools.client.JSON; /** - * CreateApplicationFormAttributes + * CreateApplicationFormDataAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApplicationFormAttributes { - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - +public class CreateApplicationFormDataAttributes { public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) private Object tags; public static final String SERIALIZED_NAME_APPLICANT_DETAILS = "applicantDetails"; @SerializedName(SERIALIZED_NAME_APPLICANT_DETAILS) - private Prefilled applicantDetails; + private ApplicationFormPrefill applicantDetails; public static final String SERIALIZED_NAME_SETTINGS_OVERRIDE = "settingsOverride"; @SerializedName(SERIALIZED_NAME_SETTINGS_OVERRIDE) - private SettingsOverride settingsOverride; + private ApplicationFormSettingsOverride settingsOverride; public static final String SERIALIZED_NAME_REQUIRE_ID_VERIFICATION = "requireIdVerification"; @SerializedName(SERIALIZED_NAME_REQUIRE_ID_VERIFICATION) @@ -184,31 +180,10 @@ public LangEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_HIDE_APPLICATION_PROGRESS_TRACKER) private Boolean hideApplicationProgressTracker; - public CreateApplicationFormAttributes() { + public CreateApplicationFormDataAttributes() { } - public CreateApplicationFormAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public CreateApplicationFormAttributes tags(Object tags) { + public CreateApplicationFormDataAttributes tags(Object tags) { this.tags = tags; return this; @@ -229,7 +204,7 @@ public void setTags(Object tags) { } - public CreateApplicationFormAttributes applicantDetails(Prefilled applicantDetails) { + public CreateApplicationFormDataAttributes applicantDetails(ApplicationFormPrefill applicantDetails) { this.applicantDetails = applicantDetails; return this; @@ -240,17 +215,17 @@ public CreateApplicationFormAttributes applicantDetails(Prefilled applicantDetai * @return applicantDetails **/ @javax.annotation.Nullable - public Prefilled getApplicantDetails() { + public ApplicationFormPrefill getApplicantDetails() { return applicantDetails; } - public void setApplicantDetails(Prefilled applicantDetails) { + public void setApplicantDetails(ApplicationFormPrefill applicantDetails) { this.applicantDetails = applicantDetails; } - public CreateApplicationFormAttributes settingsOverride(SettingsOverride settingsOverride) { + public CreateApplicationFormDataAttributes settingsOverride(ApplicationFormSettingsOverride settingsOverride) { this.settingsOverride = settingsOverride; return this; @@ -261,17 +236,17 @@ public CreateApplicationFormAttributes settingsOverride(SettingsOverride setting * @return settingsOverride **/ @javax.annotation.Nullable - public SettingsOverride getSettingsOverride() { + public ApplicationFormSettingsOverride getSettingsOverride() { return settingsOverride; } - public void setSettingsOverride(SettingsOverride settingsOverride) { + public void setSettingsOverride(ApplicationFormSettingsOverride settingsOverride) { this.settingsOverride = settingsOverride; } - public CreateApplicationFormAttributes requireIdVerification(RequireIdVerification requireIdVerification) { + public CreateApplicationFormDataAttributes requireIdVerification(RequireIdVerification requireIdVerification) { this.requireIdVerification = requireIdVerification; return this; @@ -292,13 +267,13 @@ public void setRequireIdVerification(RequireIdVerification requireIdVerification } - public CreateApplicationFormAttributes allowedApplicationTypes(List allowedApplicationTypes) { + public CreateApplicationFormDataAttributes allowedApplicationTypes(List allowedApplicationTypes) { this.allowedApplicationTypes = allowedApplicationTypes; return this; } - public CreateApplicationFormAttributes addAllowedApplicationTypesItem(AllowedApplicationTypesEnum allowedApplicationTypesItem) { + public CreateApplicationFormDataAttributes addAllowedApplicationTypesItem(AllowedApplicationTypesEnum allowedApplicationTypesItem) { if (this.allowedApplicationTypes == null) { this.allowedApplicationTypes = new ArrayList<>(); } @@ -321,7 +296,7 @@ public void setAllowedApplicationTypes(List allowed } - public CreateApplicationFormAttributes lang(LangEnum lang) { + public CreateApplicationFormDataAttributes lang(LangEnum lang) { this.lang = lang; return this; @@ -342,7 +317,7 @@ public void setLang(LangEnum lang) { } - public CreateApplicationFormAttributes hideApplicationProgressTracker(Boolean hideApplicationProgressTracker) { + public CreateApplicationFormDataAttributes hideApplicationProgressTracker(Boolean hideApplicationProgressTracker) { this.hideApplicationProgressTracker = hideApplicationProgressTracker; return this; @@ -372,27 +347,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateApplicationFormAttributes createApplicationFormAttributes = (CreateApplicationFormAttributes) o; - return Objects.equals(this.email, createApplicationFormAttributes.email) && - Objects.equals(this.tags, createApplicationFormAttributes.tags) && - Objects.equals(this.applicantDetails, createApplicationFormAttributes.applicantDetails) && - Objects.equals(this.settingsOverride, createApplicationFormAttributes.settingsOverride) && - Objects.equals(this.requireIdVerification, createApplicationFormAttributes.requireIdVerification) && - Objects.equals(this.allowedApplicationTypes, createApplicationFormAttributes.allowedApplicationTypes) && - Objects.equals(this.lang, createApplicationFormAttributes.lang) && - Objects.equals(this.hideApplicationProgressTracker, createApplicationFormAttributes.hideApplicationProgressTracker); + CreateApplicationFormDataAttributes createApplicationFormDataAttributes = (CreateApplicationFormDataAttributes) o; + return Objects.equals(this.tags, createApplicationFormDataAttributes.tags) && + Objects.equals(this.applicantDetails, createApplicationFormDataAttributes.applicantDetails) && + Objects.equals(this.settingsOverride, createApplicationFormDataAttributes.settingsOverride) && + Objects.equals(this.requireIdVerification, createApplicationFormDataAttributes.requireIdVerification) && + Objects.equals(this.allowedApplicationTypes, createApplicationFormDataAttributes.allowedApplicationTypes) && + Objects.equals(this.lang, createApplicationFormDataAttributes.lang) && + Objects.equals(this.hideApplicationProgressTracker, createApplicationFormDataAttributes.hideApplicationProgressTracker); } @Override public int hashCode() { - return Objects.hash(email, tags, applicantDetails, settingsOverride, requireIdVerification, allowedApplicationTypes, lang, hideApplicationProgressTracker); + return Objects.hash(tags, applicantDetails, settingsOverride, requireIdVerification, allowedApplicationTypes, lang, hideApplicationProgressTracker); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateApplicationFormAttributes {\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("class CreateApplicationFormDataAttributes {\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" applicantDetails: ").append(toIndentedString(applicantDetails)).append("\n"); sb.append(" settingsOverride: ").append(toIndentedString(settingsOverride)).append("\n"); @@ -422,7 +395,6 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("email"); openapiFields.add("tags"); openapiFields.add("applicantDetails"); openapiFields.add("settingsOverride"); @@ -439,33 +411,30 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApplicationFormAttributes + * @throws IOException if the JSON Element is invalid with respect to CreateApplicationFormDataAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateApplicationFormAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApplicationFormAttributes is not found in the empty JSON string", CreateApplicationFormAttributes.openapiRequiredFields.toString())); + if (!CreateApplicationFormDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApplicationFormDataAttributes is not found in the empty JSON string", CreateApplicationFormDataAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateApplicationFormAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApplicationFormAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateApplicationFormDataAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApplicationFormDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } // validate the optional field `applicantDetails` if (jsonObj.get("applicantDetails") != null && !jsonObj.get("applicantDetails").isJsonNull()) { - Prefilled.validateJsonElement(jsonObj.get("applicantDetails")); + ApplicationFormPrefill.validateJsonElement(jsonObj.get("applicantDetails")); } // validate the optional field `settingsOverride` if (jsonObj.get("settingsOverride") != null && !jsonObj.get("settingsOverride").isJsonNull()) { - SettingsOverride.validateJsonElement(jsonObj.get("settingsOverride")); + ApplicationFormSettingsOverride.validateJsonElement(jsonObj.get("settingsOverride")); } // validate the optional field `requireIdVerification` if (jsonObj.get("requireIdVerification") != null && !jsonObj.get("requireIdVerification").isJsonNull()) { @@ -484,22 +453,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApplicationFormAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApplicationFormAttributes' and its subtypes + if (!CreateApplicationFormDataAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateApplicationFormDataAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApplicationFormAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateApplicationFormDataAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateApplicationFormAttributes value) throws IOException { + public void write(JsonWriter out, CreateApplicationFormDataAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateApplicationFormAttributes read(JsonReader in) throws IOException { + public CreateApplicationFormDataAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -510,18 +479,18 @@ public CreateApplicationFormAttributes read(JsonReader in) throws IOException { } /** - * Create an instance of CreateApplicationFormAttributes given an JSON string + * Create an instance of CreateApplicationFormDataAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of CreateApplicationFormAttributes - * @throws IOException if the JSON string is invalid with respect to CreateApplicationFormAttributes + * @return An instance of CreateApplicationFormDataAttributes + * @throws IOException if the JSON string is invalid with respect to CreateApplicationFormDataAttributes */ - public static CreateApplicationFormAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApplicationFormAttributes.class); + public static CreateApplicationFormDataAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateApplicationFormDataAttributes.class); } /** - * Convert an instance of CreateApplicationFormAttributes to an JSON string + * Convert an instance of CreateApplicationFormDataAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationFormRelationships.java b/src/main/java/org/openapitools/client/model/CreateApplicationFormRelationships.java index 0fe586f0..94eceff4 100644 --- a/src/main/java/org/openapitools/client/model/CreateApplicationFormRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateApplicationFormRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBeneficialOwner.java b/src/main/java/org/openapitools/client/model/CreateBeneficialOwner.java index fbe80a8b..6bdb28e1 100644 --- a/src/main/java/org/openapitools/client/model/CreateBeneficialOwner.java +++ b/src/main/java/org/openapitools/client/model/CreateBeneficialOwner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,9 +23,12 @@ import java.time.LocalDate; import java.util.Arrays; import org.openapitools.client.model.Address; +import org.openapitools.client.model.AnnualIncome; import org.openapitools.client.model.EvaluationParams; import org.openapitools.client.model.FullName; +import org.openapitools.client.model.Occupation; import org.openapitools.client.model.Phone; +import org.openapitools.client.model.SourceOfIncome; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -100,6 +103,18 @@ public class CreateBeneficialOwner { @SerializedName(SERIALIZED_NAME_EVALUATION_PARAMS) private EvaluationParams evaluationParams; + public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; + @SerializedName(SERIALIZED_NAME_OCCUPATION) + private Occupation occupation; + + public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; + @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) + private AnnualIncome annualIncome; + + public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; + @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) + private SourceOfIncome sourceOfIncome; + public CreateBeneficialOwner() { } @@ -336,6 +351,69 @@ public void setEvaluationParams(EvaluationParams evaluationParams) { } + public CreateBeneficialOwner occupation(Occupation occupation) { + + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @javax.annotation.Nullable + public Occupation getOccupation() { + return occupation; + } + + + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public CreateBeneficialOwner annualIncome(AnnualIncome annualIncome) { + + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @javax.annotation.Nullable + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public CreateBeneficialOwner sourceOfIncome(SourceOfIncome sourceOfIncome) { + + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @javax.annotation.Nullable + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + @Override public boolean equals(Object o) { @@ -356,12 +434,15 @@ public boolean equals(Object o) { Objects.equals(this.address, createBeneficialOwner.address) && Objects.equals(this.dateOfBirth, createBeneficialOwner.dateOfBirth) && Objects.equals(this.percentage, createBeneficialOwner.percentage) && - Objects.equals(this.evaluationParams, createBeneficialOwner.evaluationParams); + Objects.equals(this.evaluationParams, createBeneficialOwner.evaluationParams) && + Objects.equals(this.occupation, createBeneficialOwner.occupation) && + Objects.equals(this.annualIncome, createBeneficialOwner.annualIncome) && + Objects.equals(this.sourceOfIncome, createBeneficialOwner.sourceOfIncome); } @Override public int hashCode() { - return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, percentage, evaluationParams); + return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, percentage, evaluationParams, occupation, annualIncome, sourceOfIncome); } @Override @@ -379,6 +460,9 @@ public String toString() { sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); sb.append("}"); return sb.toString(); } @@ -412,6 +496,9 @@ private String toIndentedString(Object o) { openapiFields.add("dateOfBirth"); openapiFields.add("percentage"); openapiFields.add("evaluationParams"); + openapiFields.add("occupation"); + openapiFields.add("annualIncome"); + openapiFields.add("sourceOfIncome"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/org/openapitools/client/model/CreateBillPayment.java b/src/main/java/org/openapitools/client/model/CreateBillPayment.java index 8591e3af..37e055bc 100644 --- a/src/main/java/org/openapitools/client/model/CreateBillPayment.java +++ b/src/main/java/org/openapitools/client/model/CreateBillPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBillPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateBillPaymentAttributes.java index b7c668c4..2d64c3b2 100644 --- a/src/main/java/org/openapitools/client/model/CreateBillPaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateBillPaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBookPayment.java b/src/main/java/org/openapitools/client/model/CreateBookPayment.java index 1d6214fb..33e7a40e 100644 --- a/src/main/java/org/openapitools/client/model/CreateBookPayment.java +++ b/src/main/java/org/openapitools/client/model/CreateBookPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBookPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateBookPaymentAttributes.java index 171936bb..5d918c99 100644 --- a/src/main/java/org/openapitools/client/model/CreateBookPaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateBookPaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBookPaymentRelationships.java b/src/main/java/org/openapitools/client/model/CreateBookPaymentRelationships.java index 46f12dc4..eb5a9265 100644 --- a/src/main/java/org/openapitools/client/model/CreateBookPaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateBookPaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBookRepayment.java b/src/main/java/org/openapitools/client/model/CreateBookRepayment.java index 4fd32aa3..07d6656e 100644 --- a/src/main/java/org/openapitools/client/model/CreateBookRepayment.java +++ b/src/main/java/org/openapitools/client/model/CreateBookRepayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBookRepaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateBookRepaymentAttributes.java index 174942ea..f024cda4 100644 --- a/src/main/java/org/openapitools/client/model/CreateBookRepaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateBookRepaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBookRepaymentRelationships.java b/src/main/java/org/openapitools/client/model/CreateBookRepaymentRelationships.java index b2d5554b..e5062649 100644 --- a/src/main/java/org/openapitools/client/model/CreateBookRepaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateBookRepaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessApplication.java b/src/main/java/org/openapitools/client/model/CreateBusinessApplication.java index 0c9a35d1..0c25071c 100644 --- a/src/main/java/org/openapitools/client/model/CreateBusinessApplication.java +++ b/src/main/java/org/openapitools/client/model/CreateBusinessApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessApplicationAttributes.java b/src/main/java/org/openapitools/client/model/CreateBusinessApplicationAttributes.java index 608c233e..22102af3 100644 --- a/src/main/java/org/openapitools/client/model/CreateBusinessApplicationAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateBusinessApplicationAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessCreditCard.java b/src/main/java/org/openapitools/client/model/CreateBusinessCreditCard.java index 5a887080..8be1e192 100644 --- a/src/main/java/org/openapitools/client/model/CreateBusinessCreditCard.java +++ b/src/main/java/org/openapitools/client/model/CreateBusinessCreditCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessDebitCard.java b/src/main/java/org/openapitools/client/model/CreateBusinessDebitCard.java index 6dbb429f..0c454dde 100644 --- a/src/main/java/org/openapitools/client/model/CreateBusinessDebitCard.java +++ b/src/main/java/org/openapitools/client/model/CreateBusinessDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/CreateBusinessDebitCardAttributes.java index 94c8c7cf..45519d54 100644 --- a/src/main/java/org/openapitools/client/model/CreateBusinessDebitCardAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateBusinessDebitCardAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualCreditCard.java b/src/main/java/org/openapitools/client/model/CreateBusinessVirtualCreditCard.java index b9b86210..29f8c177 100644 --- a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualCreditCard.java +++ b/src/main/java/org/openapitools/client/model/CreateBusinessVirtualCreditCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCard.java index f215c0bb..8489ec5a 100644 --- a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCard.java +++ b/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCardAttributes.java index 02c636de..cc31f142 100644 --- a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCardAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCardAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateCard.java b/src/main/java/org/openapitools/client/model/CreateCard.java index dc0157f8..f5292da4 100644 --- a/src/main/java/org/openapitools/client/model/CreateCard.java +++ b/src/main/java/org/openapitools/client/model/CreateCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,374 +21,115 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateBusinessCreditCard; -import org.openapitools.client.model.CreateBusinessDebitCard; -import org.openapitools.client.model.CreateBusinessVirtualCreditCard; -import org.openapitools.client.model.CreateBusinessVirtualDebitCard; -import org.openapitools.client.model.CreateBusinessVirtualDebitCardAttributes; -import org.openapitools.client.model.CreateCardRelationships; -import org.openapitools.client.model.CreateIndividualDebitCard; -import org.openapitools.client.model.CreateIndividualVirtualDebitCard; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.model.CreateCardData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.JsonArray; import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.openapitools.client.JSON; +/** + * CreateCard + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCard extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateCard.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateIndividualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualDebitCard.class)); - final TypeAdapter adapterCreateBusinessDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessDebitCard.class)); - final TypeAdapter adapterCreateBusinessCreditCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessCreditCard.class)); - final TypeAdapter adapterCreateIndividualVirtualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualVirtualDebitCard.class)); - final TypeAdapter adapterCreateBusinessVirtualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessVirtualDebitCard.class)); - final TypeAdapter adapterCreateBusinessVirtualCreditCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessVirtualCreditCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCard value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } +public class CreateCard { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateCardData data; - // check if the actual instance is of the type `CreateIndividualDebitCard` - if (value.getActualInstance() instanceof CreateIndividualDebitCard) { - JsonElement element = adapterCreateIndividualDebitCard.toJsonTree((CreateIndividualDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBusinessDebitCard` - if (value.getActualInstance() instanceof CreateBusinessDebitCard) { - JsonElement element = adapterCreateBusinessDebitCard.toJsonTree((CreateBusinessDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBusinessCreditCard` - if (value.getActualInstance() instanceof CreateBusinessCreditCard) { - JsonElement element = adapterCreateBusinessCreditCard.toJsonTree((CreateBusinessCreditCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateIndividualVirtualDebitCard` - if (value.getActualInstance() instanceof CreateIndividualVirtualDebitCard) { - JsonElement element = adapterCreateIndividualVirtualDebitCard.toJsonTree((CreateIndividualVirtualDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBusinessVirtualDebitCard` - if (value.getActualInstance() instanceof CreateBusinessVirtualDebitCard) { - JsonElement element = adapterCreateBusinessVirtualDebitCard.toJsonTree((CreateBusinessVirtualDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBusinessVirtualCreditCard` - if (value.getActualInstance() instanceof CreateBusinessVirtualCreditCard) { - JsonElement element = adapterCreateBusinessVirtualCreditCard.toJsonTree((CreateBusinessVirtualCreditCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard"); - } - - @Override - public CreateCard read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize CreateIndividualDebitCard - try { - // validate the JSON object to see if any exception is thrown - CreateIndividualDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateIndividualDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateIndividualDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateIndividualDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateIndividualDebitCard'", e); - } - // deserialize CreateBusinessDebitCard - try { - // validate the JSON object to see if any exception is thrown - CreateBusinessDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBusinessDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBusinessDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBusinessDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBusinessDebitCard'", e); - } - // deserialize CreateBusinessCreditCard - try { - // validate the JSON object to see if any exception is thrown - CreateBusinessCreditCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBusinessCreditCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBusinessCreditCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBusinessCreditCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBusinessCreditCard'", e); - } - // deserialize CreateIndividualVirtualDebitCard - try { - // validate the JSON object to see if any exception is thrown - CreateIndividualVirtualDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateIndividualVirtualDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateIndividualVirtualDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateIndividualVirtualDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateIndividualVirtualDebitCard'", e); - } - // deserialize CreateBusinessVirtualDebitCard - try { - // validate the JSON object to see if any exception is thrown - CreateBusinessVirtualDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBusinessVirtualDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBusinessVirtualDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBusinessVirtualDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBusinessVirtualDebitCard'", e); - } - // deserialize CreateBusinessVirtualCreditCard - try { - // validate the JSON object to see if any exception is thrown - CreateBusinessVirtualCreditCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBusinessVirtualCreditCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBusinessVirtualCreditCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBusinessVirtualCreditCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBusinessVirtualCreditCard'", e); - } - - if (match == 1) { - CreateCard ret = new CreateCard(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } + public CreateCard() { + } - throw new IOException(String.format("Failed deserialization for CreateCard: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } + public CreateCard data(CreateCardData data) { + + this.data = data; + return this; + } - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public CreateCardData getData() { + return data; + } - public CreateCard() { - super("oneOf", Boolean.FALSE); - } - public CreateCard(CreateBusinessCreditCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + public void setData(CreateCardData data) { + this.data = data; + } - public CreateCard(CreateBusinessDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public CreateCard(CreateBusinessVirtualCreditCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public CreateCard(CreateBusinessVirtualDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public CreateCard(CreateIndividualDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); + if (o == null || getClass() != o.getClass()) { + return false; } + CreateCard createCard = (CreateCard) o; + return Objects.equals(this.data, createCard.data); + } - public CreateCard(CreateIndividualVirtualDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + @Override + public int hashCode() { + return Objects.hash(data); + } - static { - schemas.put("CreateIndividualDebitCard", CreateIndividualDebitCard.class); - schemas.put("CreateBusinessDebitCard", CreateBusinessDebitCard.class); - schemas.put("CreateBusinessCreditCard", CreateBusinessCreditCard.class); - schemas.put("CreateIndividualVirtualDebitCard", CreateIndividualVirtualDebitCard.class); - schemas.put("CreateBusinessVirtualDebitCard", CreateBusinessVirtualDebitCard.class); - schemas.put("CreateBusinessVirtualCreditCard", CreateBusinessVirtualCreditCard.class); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCard {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } - @Override - public Map> getSchemas() { - return CreateCard.schemas; + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } + return o.toString().replace("\n", "\n "); + } - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateIndividualDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBusinessDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBusinessCreditCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateIndividualVirtualDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBusinessVirtualDebitCard) { - super.setActualInstance(instance); - return; - } - if (instance instanceof CreateBusinessVirtualCreditCard) { - super.setActualInstance(instance); - return; - } + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; - throw new RuntimeException("Invalid instance type. Must be CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard"); - } + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); - /** - * Get the actual instance, which can be the following: - * CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard - * - * @return The actual instance (CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CreateIndividualDebitCard`. If the actual instance is not `CreateIndividualDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateIndividualDebitCard` - * @throws ClassCastException if the instance is not `CreateIndividualDebitCard` - */ - public CreateIndividualDebitCard getCreateIndividualDebitCard() throws ClassCastException { - return (CreateIndividualDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBusinessDebitCard`. If the actual instance is not `CreateBusinessDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBusinessDebitCard` - * @throws ClassCastException if the instance is not `CreateBusinessDebitCard` - */ - public CreateBusinessDebitCard getCreateBusinessDebitCard() throws ClassCastException { - return (CreateBusinessDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBusinessCreditCard`. If the actual instance is not `CreateBusinessCreditCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBusinessCreditCard` - * @throws ClassCastException if the instance is not `CreateBusinessCreditCard` - */ - public CreateBusinessCreditCard getCreateBusinessCreditCard() throws ClassCastException { - return (CreateBusinessCreditCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateIndividualVirtualDebitCard`. If the actual instance is not `CreateIndividualVirtualDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateIndividualVirtualDebitCard` - * @throws ClassCastException if the instance is not `CreateIndividualVirtualDebitCard` - */ - public CreateIndividualVirtualDebitCard getCreateIndividualVirtualDebitCard() throws ClassCastException { - return (CreateIndividualVirtualDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBusinessVirtualDebitCard`. If the actual instance is not `CreateBusinessVirtualDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBusinessVirtualDebitCard` - * @throws ClassCastException if the instance is not `CreateBusinessVirtualDebitCard` - */ - public CreateBusinessVirtualDebitCard getCreateBusinessVirtualDebitCard() throws ClassCastException { - return (CreateBusinessVirtualDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBusinessVirtualCreditCard`. If the actual instance is not `CreateBusinessVirtualCreditCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBusinessVirtualCreditCard` - * @throws ClassCastException if the instance is not `CreateBusinessVirtualCreditCard` - */ - public CreateBusinessVirtualCreditCard getCreateBusinessVirtualCreditCard() throws ClassCastException { - return (CreateBusinessVirtualCreditCard)super.getActualInstance(); - } + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } /** * Validates the JSON Element and throws an exception if issues found @@ -397,59 +138,52 @@ public CreateBusinessVirtualCreditCard getCreateBusinessVirtualCreditCard() thro * @throws IOException if the JSON Element is invalid with respect to CreateCard */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateIndividualDebitCard - try { - CreateIndividualDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateIndividualDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBusinessDebitCard - try { - CreateBusinessDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBusinessDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBusinessCreditCard - try { - CreateBusinessCreditCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBusinessCreditCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateIndividualVirtualDebitCard - try { - CreateIndividualVirtualDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateIndividualVirtualDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBusinessVirtualDebitCard - try { - CreateBusinessVirtualDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBusinessVirtualDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBusinessVirtualCreditCard - try { - CreateBusinessVirtualCreditCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBusinessVirtualCreditCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateCard with oneOf schemas: CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + if (jsonElement == null) { + if (!CreateCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCard is not found in the empty JSON string", CreateCard.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateCard.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateCardData.validateJsonElement(jsonObj.get("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCard.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCard' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCard.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCard value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateCard read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } } diff --git a/src/main/java/org/openapitools/client/model/CreateCardData.java b/src/main/java/org/openapitools/client/model/CreateCardData.java new file mode 100644 index 00000000..bb23d505 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateCardData.java @@ -0,0 +1,476 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateBusinessCreditCard; +import org.openapitools.client.model.CreateBusinessDebitCard; +import org.openapitools.client.model.CreateBusinessVirtualCreditCard; +import org.openapitools.client.model.CreateBusinessVirtualDebitCard; +import org.openapitools.client.model.CreateBusinessVirtualDebitCardAttributes; +import org.openapitools.client.model.CreateCardRelationships; +import org.openapitools.client.model.CreateIndividualDebitCard; +import org.openapitools.client.model.CreateIndividualVirtualDebitCard; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import org.openapitools.client.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCardData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateCardData.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCardData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCardData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterCreateIndividualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualDebitCard.class)); + final TypeAdapter adapterCreateBusinessDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessDebitCard.class)); + final TypeAdapter adapterCreateBusinessCreditCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessCreditCard.class)); + final TypeAdapter adapterCreateIndividualVirtualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualVirtualDebitCard.class)); + final TypeAdapter adapterCreateBusinessVirtualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessVirtualDebitCard.class)); + final TypeAdapter adapterCreateBusinessVirtualCreditCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessVirtualCreditCard.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCardData value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `CreateIndividualDebitCard` + if (value.getActualInstance() instanceof CreateIndividualDebitCard) { + JsonElement element = adapterCreateIndividualDebitCard.toJsonTree((CreateIndividualDebitCard)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateBusinessDebitCard` + if (value.getActualInstance() instanceof CreateBusinessDebitCard) { + JsonElement element = adapterCreateBusinessDebitCard.toJsonTree((CreateBusinessDebitCard)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateBusinessCreditCard` + if (value.getActualInstance() instanceof CreateBusinessCreditCard) { + JsonElement element = adapterCreateBusinessCreditCard.toJsonTree((CreateBusinessCreditCard)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateIndividualVirtualDebitCard` + if (value.getActualInstance() instanceof CreateIndividualVirtualDebitCard) { + JsonElement element = adapterCreateIndividualVirtualDebitCard.toJsonTree((CreateIndividualVirtualDebitCard)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateBusinessVirtualDebitCard` + if (value.getActualInstance() instanceof CreateBusinessVirtualDebitCard) { + JsonElement element = adapterCreateBusinessVirtualDebitCard.toJsonTree((CreateBusinessVirtualDebitCard)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateBusinessVirtualCreditCard` + if (value.getActualInstance() instanceof CreateBusinessVirtualCreditCard) { + JsonElement element = adapterCreateBusinessVirtualCreditCard.toJsonTree((CreateBusinessVirtualCreditCard)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard"); + } + + @Override + public CreateCardData read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize CreateIndividualDebitCard + try { + // validate the JSON object to see if any exception is thrown + CreateIndividualDebitCard.validateJsonElement(jsonElement); + actualAdapter = adapterCreateIndividualDebitCard; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateIndividualDebitCard'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateIndividualDebitCard failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateIndividualDebitCard'", e); + } + // deserialize CreateBusinessDebitCard + try { + // validate the JSON object to see if any exception is thrown + CreateBusinessDebitCard.validateJsonElement(jsonElement); + actualAdapter = adapterCreateBusinessDebitCard; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBusinessDebitCard'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateBusinessDebitCard failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateBusinessDebitCard'", e); + } + // deserialize CreateBusinessCreditCard + try { + // validate the JSON object to see if any exception is thrown + CreateBusinessCreditCard.validateJsonElement(jsonElement); + actualAdapter = adapterCreateBusinessCreditCard; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBusinessCreditCard'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateBusinessCreditCard failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateBusinessCreditCard'", e); + } + // deserialize CreateIndividualVirtualDebitCard + try { + // validate the JSON object to see if any exception is thrown + CreateIndividualVirtualDebitCard.validateJsonElement(jsonElement); + actualAdapter = adapterCreateIndividualVirtualDebitCard; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateIndividualVirtualDebitCard'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateIndividualVirtualDebitCard failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateIndividualVirtualDebitCard'", e); + } + // deserialize CreateBusinessVirtualDebitCard + try { + // validate the JSON object to see if any exception is thrown + CreateBusinessVirtualDebitCard.validateJsonElement(jsonElement); + actualAdapter = adapterCreateBusinessVirtualDebitCard; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBusinessVirtualDebitCard'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateBusinessVirtualDebitCard failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateBusinessVirtualDebitCard'", e); + } + // deserialize CreateBusinessVirtualCreditCard + try { + // validate the JSON object to see if any exception is thrown + CreateBusinessVirtualCreditCard.validateJsonElement(jsonElement); + actualAdapter = adapterCreateBusinessVirtualCreditCard; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBusinessVirtualCreditCard'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateBusinessVirtualCreditCard failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateBusinessVirtualCreditCard'", e); + } + + if (match == 1) { + CreateCardData ret = new CreateCardData(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for CreateCardData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public CreateCardData() { + super("oneOf", Boolean.FALSE); + } + + public CreateCardData(CreateBusinessCreditCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateBusinessDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateBusinessVirtualCreditCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateBusinessVirtualDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateIndividualDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateIndividualVirtualDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateIndividualDebitCard", CreateIndividualDebitCard.class); + schemas.put("CreateBusinessDebitCard", CreateBusinessDebitCard.class); + schemas.put("CreateBusinessCreditCard", CreateBusinessCreditCard.class); + schemas.put("CreateIndividualVirtualDebitCard", CreateIndividualVirtualDebitCard.class); + schemas.put("CreateBusinessVirtualDebitCard", CreateBusinessVirtualDebitCard.class); + schemas.put("CreateBusinessVirtualCreditCard", CreateBusinessVirtualCreditCard.class); + } + + @Override + public Map> getSchemas() { + return CreateCardData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof CreateIndividualDebitCard) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateBusinessDebitCard) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateBusinessCreditCard) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateIndividualVirtualDebitCard) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateBusinessVirtualDebitCard) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateBusinessVirtualCreditCard) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard"); + } + + /** + * Get the actual instance, which can be the following: + * CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard + * + * @return The actual instance (CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateIndividualDebitCard`. If the actual instance is not `CreateIndividualDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateIndividualDebitCard` + * @throws ClassCastException if the instance is not `CreateIndividualDebitCard` + */ + public CreateIndividualDebitCard getCreateIndividualDebitCard() throws ClassCastException { + return (CreateIndividualDebitCard)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateBusinessDebitCard`. If the actual instance is not `CreateBusinessDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBusinessDebitCard` + * @throws ClassCastException if the instance is not `CreateBusinessDebitCard` + */ + public CreateBusinessDebitCard getCreateBusinessDebitCard() throws ClassCastException { + return (CreateBusinessDebitCard)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateBusinessCreditCard`. If the actual instance is not `CreateBusinessCreditCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBusinessCreditCard` + * @throws ClassCastException if the instance is not `CreateBusinessCreditCard` + */ + public CreateBusinessCreditCard getCreateBusinessCreditCard() throws ClassCastException { + return (CreateBusinessCreditCard)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateIndividualVirtualDebitCard`. If the actual instance is not `CreateIndividualVirtualDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateIndividualVirtualDebitCard` + * @throws ClassCastException if the instance is not `CreateIndividualVirtualDebitCard` + */ + public CreateIndividualVirtualDebitCard getCreateIndividualVirtualDebitCard() throws ClassCastException { + return (CreateIndividualVirtualDebitCard)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateBusinessVirtualDebitCard`. If the actual instance is not `CreateBusinessVirtualDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBusinessVirtualDebitCard` + * @throws ClassCastException if the instance is not `CreateBusinessVirtualDebitCard` + */ + public CreateBusinessVirtualDebitCard getCreateBusinessVirtualDebitCard() throws ClassCastException { + return (CreateBusinessVirtualDebitCard)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateBusinessVirtualCreditCard`. If the actual instance is not `CreateBusinessVirtualCreditCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBusinessVirtualCreditCard` + * @throws ClassCastException if the instance is not `CreateBusinessVirtualCreditCard` + */ + public CreateBusinessVirtualCreditCard getCreateBusinessVirtualCreditCard() throws ClassCastException { + return (CreateBusinessVirtualCreditCard)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCardData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with CreateIndividualDebitCard + try { + CreateIndividualDebitCard.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateIndividualDebitCard failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateBusinessDebitCard + try { + CreateBusinessDebitCard.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateBusinessDebitCard failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateBusinessCreditCard + try { + CreateBusinessCreditCard.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateBusinessCreditCard failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateIndividualVirtualDebitCard + try { + CreateIndividualVirtualDebitCard.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateIndividualVirtualDebitCard failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateBusinessVirtualDebitCard + try { + CreateBusinessVirtualDebitCard.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateBusinessVirtualDebitCard failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateBusinessVirtualCreditCard + try { + CreateBusinessVirtualCreditCard.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateBusinessVirtualCreditCard failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for CreateCardData with oneOf schemas: CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of CreateCardData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCardData + * @throws IOException if the JSON string is invalid with respect to CreateCardData + */ + public static CreateCardData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCardData.class); + } + + /** + * Convert an instance of CreateCardData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateCardRelationships.java b/src/main/java/org/openapitools/client/model/CreateCardRelationships.java index 14c6b64b..3672b6ee 100644 --- a/src/main/java/org/openapitools/client/model/CreateCardRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateCardRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateCheckDeposit.java b/src/main/java/org/openapitools/client/model/CreateCheckDeposit.java index b5a06d99..8295c0ae 100644 --- a/src/main/java/org/openapitools/client/model/CreateCheckDeposit.java +++ b/src/main/java/org/openapitools/client/model/CreateCheckDeposit.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,8 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateCheckDepositAttributes; -import org.openapitools.client.model.CreateCheckDepositRelationships; +import org.openapitools.client.model.CreateCheckDepositData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,126 +52,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateCheckDeposit { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CHECKDEPOSIT("checkDeposit"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateCheckDepositAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCheckDepositRelationships relationships; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateCheckDepositData data; public CreateCheckDeposit() { } - public CreateCheckDeposit type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateCheckDeposit attributes(CreateCheckDepositAttributes attributes) { + public CreateCheckDeposit data(CreateCheckDepositData data) { - this.attributes = attributes; + this.data = data; return this; } /** - * Get attributes - * @return attributes + * Get data + * @return data **/ - @javax.annotation.Nonnull - public CreateCheckDepositAttributes getAttributes() { - return attributes; + @javax.annotation.Nullable + public CreateCheckDepositData getData() { + return data; } - public void setAttributes(CreateCheckDepositAttributes attributes) { - this.attributes = attributes; - } - - - public CreateCheckDeposit relationships(CreateCheckDepositRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCheckDepositRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCheckDepositRelationships relationships) { - this.relationships = relationships; + public void setData(CreateCheckDepositData data) { + this.data = data; } @@ -186,23 +90,19 @@ public boolean equals(Object o) { return false; } CreateCheckDeposit createCheckDeposit = (CreateCheckDeposit) o; - return Objects.equals(this.type, createCheckDeposit.type) && - Objects.equals(this.attributes, createCheckDeposit.attributes) && - Objects.equals(this.relationships, createCheckDeposit.relationships); + return Objects.equals(this.data, createCheckDeposit.data); } @Override public int hashCode() { - return Objects.hash(type, attributes, relationships); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateCheckDeposit {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -225,15 +125,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); } /** @@ -256,21 +151,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCheckDeposit` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCheckDeposit.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateCheckDepositData.validateJsonElement(jsonObj.get("data")); } - // validate the required field `attributes` - CreateCheckDepositAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCheckDepositRelationships.validateJsonElement(jsonObj.get("relationships")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/CreateFee.java b/src/main/java/org/openapitools/client/model/CreateCheckDepositData.java similarity index 70% rename from src/main/java/org/openapitools/client/model/CreateFee.java rename to src/main/java/org/openapitools/client/model/CreateCheckDepositData.java index 26ed541c..c053142b 100644 --- a/src/main/java/org/openapitools/client/model/CreateFee.java +++ b/src/main/java/org/openapitools/client/model/CreateCheckDepositData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,8 +21,8 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateFeeAttributes; -import org.openapitools.client.model.CreateFeeRelationships; +import org.openapitools.client.model.CreateCheckDepositDataAttributes; +import org.openapitools.client.model.CreateCheckDepositRelationships; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -49,16 +49,16 @@ import org.openapitools.client.JSON; /** - * CreateFee + * CreateCheckDepositData */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateFee { +public class CreateCheckDepositData { /** * Gets or Sets type */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FEE("fee"); + CHECKDEPOSIT("checkDeposit"); private String value; @@ -100,20 +100,20 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; + private TypeEnum type = TypeEnum.CHECKDEPOSIT; public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateFeeAttributes attributes; + private CreateCheckDepositDataAttributes attributes; public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateFeeRelationships relationships; + private CreateCheckDepositRelationships relationships; - public CreateFee() { + public CreateCheckDepositData() { } - public CreateFee type(TypeEnum type) { + public CreateCheckDepositData type(TypeEnum type) { this.type = type; return this; @@ -134,7 +134,7 @@ public void setType(TypeEnum type) { } - public CreateFee attributes(CreateFeeAttributes attributes) { + public CreateCheckDepositData attributes(CreateCheckDepositDataAttributes attributes) { this.attributes = attributes; return this; @@ -145,17 +145,17 @@ public CreateFee attributes(CreateFeeAttributes attributes) { * @return attributes **/ @javax.annotation.Nonnull - public CreateFeeAttributes getAttributes() { + public CreateCheckDepositDataAttributes getAttributes() { return attributes; } - public void setAttributes(CreateFeeAttributes attributes) { + public void setAttributes(CreateCheckDepositDataAttributes attributes) { this.attributes = attributes; } - public CreateFee relationships(CreateFeeRelationships relationships) { + public CreateCheckDepositData relationships(CreateCheckDepositRelationships relationships) { this.relationships = relationships; return this; @@ -166,12 +166,12 @@ public CreateFee relationships(CreateFeeRelationships relationships) { * @return relationships **/ @javax.annotation.Nonnull - public CreateFeeRelationships getRelationships() { + public CreateCheckDepositRelationships getRelationships() { return relationships; } - public void setRelationships(CreateFeeRelationships relationships) { + public void setRelationships(CreateCheckDepositRelationships relationships) { this.relationships = relationships; } @@ -185,10 +185,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateFee createFee = (CreateFee) o; - return Objects.equals(this.type, createFee.type) && - Objects.equals(this.attributes, createFee.attributes) && - Objects.equals(this.relationships, createFee.relationships); + CreateCheckDepositData createCheckDepositData = (CreateCheckDepositData) o; + return Objects.equals(this.type, createCheckDepositData.type) && + Objects.equals(this.attributes, createCheckDepositData.attributes) && + Objects.equals(this.relationships, createCheckDepositData.relationships); } @Override @@ -199,7 +199,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateFee {\n"); + sb.append("class CreateCheckDepositData {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); @@ -240,25 +240,25 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateFee + * @throws IOException if the JSON Element is invalid with respect to CreateCheckDepositData */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateFee.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateFee is not found in the empty JSON string", CreateFee.openapiRequiredFields.toString())); + if (!CreateCheckDepositData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCheckDepositData is not found in the empty JSON string", CreateCheckDepositData.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateFee.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateFee` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateCheckDepositData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCheckDepositData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateFee.openapiRequiredFields) { + for (String requiredField : CreateCheckDepositData.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -268,31 +268,31 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } // validate the required field `attributes` - CreateFeeAttributes.validateJsonElement(jsonObj.get("attributes")); + CreateCheckDepositDataAttributes.validateJsonElement(jsonObj.get("attributes")); // validate the required field `relationships` - CreateFeeRelationships.validateJsonElement(jsonObj.get("relationships")); + CreateCheckDepositRelationships.validateJsonElement(jsonObj.get("relationships")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateFee.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateFee' and its subtypes + if (!CreateCheckDepositData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCheckDepositData' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateFee.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCheckDepositData.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateFee value) throws IOException { + public void write(JsonWriter out, CreateCheckDepositData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateFee read(JsonReader in) throws IOException { + public CreateCheckDepositData read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -303,18 +303,18 @@ public CreateFee read(JsonReader in) throws IOException { } /** - * Create an instance of CreateFee given an JSON string + * Create an instance of CreateCheckDepositData given an JSON string * * @param jsonString JSON string - * @return An instance of CreateFee - * @throws IOException if the JSON string is invalid with respect to CreateFee + * @return An instance of CreateCheckDepositData + * @throws IOException if the JSON string is invalid with respect to CreateCheckDepositData */ - public static CreateFee fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateFee.class); + public static CreateCheckDepositData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCheckDepositData.class); } /** - * Convert an instance of CreateFee to an JSON string + * Convert an instance of CreateCheckDepositData to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateCheckDepositAttributes.java b/src/main/java/org/openapitools/client/model/CreateCheckDepositDataAttributes.java similarity index 76% rename from src/main/java/org/openapitools/client/model/CreateCheckDepositAttributes.java rename to src/main/java/org/openapitools/client/model/CreateCheckDepositDataAttributes.java index dfe39be2..206e1f77 100644 --- a/src/main/java/org/openapitools/client/model/CreateCheckDepositAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateCheckDepositDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,10 +47,10 @@ import org.openapitools.client.JSON; /** - * CreateCheckDepositAttributes + * CreateCheckDepositDataAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCheckDepositAttributes { +public class CreateCheckDepositDataAttributes { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) private Integer amount; @@ -67,10 +67,10 @@ public class CreateCheckDepositAttributes { @SerializedName(SERIALIZED_NAME_TAGS) private Object tags; - public CreateCheckDepositAttributes() { + public CreateCheckDepositDataAttributes() { } - public CreateCheckDepositAttributes amount(Integer amount) { + public CreateCheckDepositDataAttributes amount(Integer amount) { this.amount = amount; return this; @@ -92,7 +92,7 @@ public void setAmount(Integer amount) { } - public CreateCheckDepositAttributes description(String description) { + public CreateCheckDepositDataAttributes description(String description) { this.description = description; return this; @@ -113,7 +113,7 @@ public void setDescription(String description) { } - public CreateCheckDepositAttributes idempotencyKey(String idempotencyKey) { + public CreateCheckDepositDataAttributes idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; @@ -134,7 +134,7 @@ public void setIdempotencyKey(String idempotencyKey) { } - public CreateCheckDepositAttributes tags(Object tags) { + public CreateCheckDepositDataAttributes tags(Object tags) { this.tags = tags; return this; @@ -164,11 +164,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateCheckDepositAttributes createCheckDepositAttributes = (CreateCheckDepositAttributes) o; - return Objects.equals(this.amount, createCheckDepositAttributes.amount) && - Objects.equals(this.description, createCheckDepositAttributes.description) && - Objects.equals(this.idempotencyKey, createCheckDepositAttributes.idempotencyKey) && - Objects.equals(this.tags, createCheckDepositAttributes.tags); + CreateCheckDepositDataAttributes createCheckDepositDataAttributes = (CreateCheckDepositDataAttributes) o; + return Objects.equals(this.amount, createCheckDepositDataAttributes.amount) && + Objects.equals(this.description, createCheckDepositDataAttributes.description) && + Objects.equals(this.idempotencyKey, createCheckDepositDataAttributes.idempotencyKey) && + Objects.equals(this.tags, createCheckDepositDataAttributes.tags); } @Override @@ -179,7 +179,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateCheckDepositAttributes {\n"); + sb.append("class CreateCheckDepositDataAttributes {\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); @@ -221,25 +221,25 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCheckDepositAttributes + * @throws IOException if the JSON Element is invalid with respect to CreateCheckDepositDataAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateCheckDepositAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCheckDepositAttributes is not found in the empty JSON string", CreateCheckDepositAttributes.openapiRequiredFields.toString())); + if (!CreateCheckDepositDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCheckDepositDataAttributes is not found in the empty JSON string", CreateCheckDepositDataAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateCheckDepositAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCheckDepositAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateCheckDepositDataAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCheckDepositDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCheckDepositAttributes.openapiRequiredFields) { + for (String requiredField : CreateCheckDepositDataAttributes.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -257,22 +257,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCheckDepositAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCheckDepositAttributes' and its subtypes + if (!CreateCheckDepositDataAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCheckDepositDataAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCheckDepositAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCheckDepositDataAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateCheckDepositAttributes value) throws IOException { + public void write(JsonWriter out, CreateCheckDepositDataAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateCheckDepositAttributes read(JsonReader in) throws IOException { + public CreateCheckDepositDataAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -283,18 +283,18 @@ public CreateCheckDepositAttributes read(JsonReader in) throws IOException { } /** - * Create an instance of CreateCheckDepositAttributes given an JSON string + * Create an instance of CreateCheckDepositDataAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of CreateCheckDepositAttributes - * @throws IOException if the JSON string is invalid with respect to CreateCheckDepositAttributes + * @return An instance of CreateCheckDepositDataAttributes + * @throws IOException if the JSON string is invalid with respect to CreateCheckDepositDataAttributes */ - public static CreateCheckDepositAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCheckDepositAttributes.class); + public static CreateCheckDepositDataAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCheckDepositDataAttributes.class); } /** - * Convert an instance of CreateCheckDepositAttributes to an JSON string + * Convert an instance of CreateCheckDepositDataAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateCheckDepositRelationships.java b/src/main/java/org/openapitools/client/model/CreateCheckDepositRelationships.java index ce1c36b5..75fe67a4 100644 --- a/src/main/java/org/openapitools/client/model/CreateCheckDepositRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateCheckDepositRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateCheckPayment.java b/src/main/java/org/openapitools/client/model/CreateCheckPayment.java index 92ea1164..ab7a0d24 100644 --- a/src/main/java/org/openapitools/client/model/CreateCheckPayment.java +++ b/src/main/java/org/openapitools/client/model/CreateCheckPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateCounterparty.java b/src/main/java/org/openapitools/client/model/CreateCounterparty.java index a729a8b7..d596d12b 100644 --- a/src/main/java/org/openapitools/client/model/CreateCounterparty.java +++ b/src/main/java/org/openapitools/client/model/CreateCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,210 +21,115 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateAchCounterparty; -import org.openapitools.client.model.CreateCounterpartyRelationships; -import org.openapitools.client.model.CreatePlaidCounterparty; -import org.openapitools.client.model.CreatePlaidCounterpartyAttributes; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.model.CreateCounterpartyData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.JsonArray; import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.openapitools.client.JSON; +/** + * CreateCounterparty + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCounterparty extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateCounterparty.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateAchCounterparty = gson.getDelegateAdapter(this, TypeToken.get(CreateAchCounterparty.class)); - final TypeAdapter adapterCreatePlaidCounterparty = gson.getDelegateAdapter(this, TypeToken.get(CreatePlaidCounterparty.class)); +public class CreateCounterparty { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateCounterpartyData data; - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCounterparty value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } + public CreateCounterparty() { + } - // check if the actual instance is of the type `CreateAchCounterparty` - if (value.getActualInstance() instanceof CreateAchCounterparty) { - JsonElement element = adapterCreateAchCounterparty.toJsonTree((CreateAchCounterparty)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreatePlaidCounterparty` - if (value.getActualInstance() instanceof CreatePlaidCounterparty) { - JsonElement element = adapterCreatePlaidCounterparty.toJsonTree((CreatePlaidCounterparty)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateAchCounterparty, CreatePlaidCounterparty"); - } + public CreateCounterparty data(CreateCounterpartyData data) { + + this.data = data; + return this; + } - @Override - public CreateCounterparty read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public CreateCounterpartyData getData() { + return data; + } - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - // deserialize CreateAchCounterparty - try { - // validate the JSON object to see if any exception is thrown - CreateAchCounterparty.validateJsonElement(jsonElement); - actualAdapter = adapterCreateAchCounterparty; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateAchCounterparty'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateAchCounterparty failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateAchCounterparty'", e); - } - // deserialize CreatePlaidCounterparty - try { - // validate the JSON object to see if any exception is thrown - CreatePlaidCounterparty.validateJsonElement(jsonElement); - actualAdapter = adapterCreatePlaidCounterparty; - match++; - log.log(Level.FINER, "Input data matches schema 'CreatePlaidCounterparty'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreatePlaidCounterparty failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreatePlaidCounterparty'", e); - } + public void setData(CreateCounterpartyData data) { + this.data = data; + } - if (match == 1) { - CreateCounterparty ret = new CreateCounterparty(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - throw new IOException(String.format("Failed deserialization for CreateCounterparty: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - public CreateCounterparty() { - super("oneOf", Boolean.FALSE); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public CreateCounterparty(CreateAchCounterparty o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); + if (o == null || getClass() != o.getClass()) { + return false; } + CreateCounterparty createCounterparty = (CreateCounterparty) o; + return Objects.equals(this.data, createCounterparty.data); + } - public CreateCounterparty(CreatePlaidCounterparty o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + @Override + public int hashCode() { + return Objects.hash(data); + } - static { - schemas.put("CreateAchCounterparty", CreateAchCounterparty.class); - schemas.put("CreatePlaidCounterparty", CreatePlaidCounterparty.class); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCounterparty {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } - @Override - public Map> getSchemas() { - return CreateCounterparty.schemas; + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } + return o.toString().replace("\n", "\n "); + } - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateAchCounterparty, CreatePlaidCounterparty - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateAchCounterparty) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreatePlaidCounterparty) { - super.setActualInstance(instance); - return; - } - throw new RuntimeException("Invalid instance type. Must be CreateAchCounterparty, CreatePlaidCounterparty"); - } + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; - /** - * Get the actual instance, which can be the following: - * CreateAchCounterparty, CreatePlaidCounterparty - * - * @return The actual instance (CreateAchCounterparty, CreatePlaidCounterparty) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); - /** - * Get the actual instance of `CreateAchCounterparty`. If the actual instance is not `CreateAchCounterparty`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateAchCounterparty` - * @throws ClassCastException if the instance is not `CreateAchCounterparty` - */ - public CreateAchCounterparty getCreateAchCounterparty() throws ClassCastException { - return (CreateAchCounterparty)super.getActualInstance(); - } - /** - * Get the actual instance of `CreatePlaidCounterparty`. If the actual instance is not `CreatePlaidCounterparty`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreatePlaidCounterparty` - * @throws ClassCastException if the instance is not `CreatePlaidCounterparty` - */ - public CreatePlaidCounterparty getCreatePlaidCounterparty() throws ClassCastException { - return (CreatePlaidCounterparty)super.getActualInstance(); - } + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } /** * Validates the JSON Element and throws an exception if issues found @@ -233,27 +138,52 @@ public CreatePlaidCounterparty getCreatePlaidCounterparty() throws ClassCastExce * @throws IOException if the JSON Element is invalid with respect to CreateCounterparty */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateAchCounterparty - try { - CreateAchCounterparty.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateAchCounterparty failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreatePlaidCounterparty - try { - CreatePlaidCounterparty.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreatePlaidCounterparty failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateCounterparty with oneOf schemas: CreateAchCounterparty, CreatePlaidCounterparty. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + if (jsonElement == null) { + if (!CreateCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCounterparty is not found in the empty JSON string", CreateCounterparty.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateCounterparty.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateCounterpartyData.validateJsonElement(jsonObj.get("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCounterparty.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCounterparty' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCounterparty.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCounterparty value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateCounterparty read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } } diff --git a/src/main/java/org/openapitools/client/model/CreateCounterpartyData.java b/src/main/java/org/openapitools/client/model/CreateCounterpartyData.java new file mode 100644 index 00000000..8d6e86dd --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateCounterpartyData.java @@ -0,0 +1,280 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateAchCounterparty; +import org.openapitools.client.model.CreateCounterpartyRelationships; +import org.openapitools.client.model.CreatePlaidCounterparty; +import org.openapitools.client.model.CreatePlaidCounterpartyAttributes; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import org.openapitools.client.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCounterpartyData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateCounterpartyData.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCounterpartyData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCounterpartyData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterCreateAchCounterparty = gson.getDelegateAdapter(this, TypeToken.get(CreateAchCounterparty.class)); + final TypeAdapter adapterCreatePlaidCounterparty = gson.getDelegateAdapter(this, TypeToken.get(CreatePlaidCounterparty.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCounterpartyData value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `CreateAchCounterparty` + if (value.getActualInstance() instanceof CreateAchCounterparty) { + JsonElement element = adapterCreateAchCounterparty.toJsonTree((CreateAchCounterparty)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreatePlaidCounterparty` + if (value.getActualInstance() instanceof CreatePlaidCounterparty) { + JsonElement element = adapterCreatePlaidCounterparty.toJsonTree((CreatePlaidCounterparty)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateAchCounterparty, CreatePlaidCounterparty"); + } + + @Override + public CreateCounterpartyData read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize CreateAchCounterparty + try { + // validate the JSON object to see if any exception is thrown + CreateAchCounterparty.validateJsonElement(jsonElement); + actualAdapter = adapterCreateAchCounterparty; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateAchCounterparty'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateAchCounterparty failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateAchCounterparty'", e); + } + // deserialize CreatePlaidCounterparty + try { + // validate the JSON object to see if any exception is thrown + CreatePlaidCounterparty.validateJsonElement(jsonElement); + actualAdapter = adapterCreatePlaidCounterparty; + match++; + log.log(Level.FINER, "Input data matches schema 'CreatePlaidCounterparty'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreatePlaidCounterparty failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreatePlaidCounterparty'", e); + } + + if (match == 1) { + CreateCounterpartyData ret = new CreateCounterpartyData(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for CreateCounterpartyData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public CreateCounterpartyData() { + super("oneOf", Boolean.FALSE); + } + + public CreateCounterpartyData(CreateAchCounterparty o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCounterpartyData(CreatePlaidCounterparty o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateAchCounterparty", CreateAchCounterparty.class); + schemas.put("CreatePlaidCounterparty", CreatePlaidCounterparty.class); + } + + @Override + public Map> getSchemas() { + return CreateCounterpartyData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateAchCounterparty, CreatePlaidCounterparty + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof CreateAchCounterparty) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreatePlaidCounterparty) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateAchCounterparty, CreatePlaidCounterparty"); + } + + /** + * Get the actual instance, which can be the following: + * CreateAchCounterparty, CreatePlaidCounterparty + * + * @return The actual instance (CreateAchCounterparty, CreatePlaidCounterparty) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateAchCounterparty`. If the actual instance is not `CreateAchCounterparty`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateAchCounterparty` + * @throws ClassCastException if the instance is not `CreateAchCounterparty` + */ + public CreateAchCounterparty getCreateAchCounterparty() throws ClassCastException { + return (CreateAchCounterparty)super.getActualInstance(); + } + /** + * Get the actual instance of `CreatePlaidCounterparty`. If the actual instance is not `CreatePlaidCounterparty`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreatePlaidCounterparty` + * @throws ClassCastException if the instance is not `CreatePlaidCounterparty` + */ + public CreatePlaidCounterparty getCreatePlaidCounterparty() throws ClassCastException { + return (CreatePlaidCounterparty)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCounterpartyData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with CreateAchCounterparty + try { + CreateAchCounterparty.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateAchCounterparty failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreatePlaidCounterparty + try { + CreatePlaidCounterparty.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreatePlaidCounterparty failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for CreateCounterpartyData with oneOf schemas: CreateAchCounterparty, CreatePlaidCounterparty. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of CreateCounterpartyData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCounterpartyData + * @throws IOException if the JSON string is invalid with respect to CreateCounterpartyData + */ + public static CreateCounterpartyData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCounterpartyData.class); + } + + /** + * Convert an instance of CreateCounterpartyData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateCounterpartyRelationships.java b/src/main/java/org/openapitools/client/model/CreateCounterpartyRelationships.java index ca59e554..a73475de 100644 --- a/src/main/java/org/openapitools/client/model/CreateCounterpartyRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateCounterpartyRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateCreditAccount.java b/src/main/java/org/openapitools/client/model/CreateCreditAccount.java index 28fffaf4..a44d76ae 100644 --- a/src/main/java/org/openapitools/client/model/CreateCreditAccount.java +++ b/src/main/java/org/openapitools/client/model/CreateCreditAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateCreditAccountAttributes.java b/src/main/java/org/openapitools/client/model/CreateCreditAccountAttributes.java index 05ffc1f3..2de597ef 100644 --- a/src/main/java/org/openapitools/client/model/CreateCreditAccountAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateCreditAccountAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateCreditAccountRelationships.java b/src/main/java/org/openapitools/client/model/CreateCreditAccountRelationships.java index a3a051fa..fdf2035e 100644 --- a/src/main/java/org/openapitools/client/model/CreateCreditAccountRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateCreditAccountRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerToken.java b/src/main/java/org/openapitools/client/model/CreateCustomerToken.java index 62f11bc1..1d43b530 100644 --- a/src/main/java/org/openapitools/client/model/CreateCustomerToken.java +++ b/src/main/java/org/openapitools/client/model/CreateCustomerToken.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateCustomerTokenAttributes; +import org.openapitools.client.model.CreateCustomerTokenData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,56 +52,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateCustomerToken { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "customerToken"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateCustomerTokenAttributes attributes; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateCustomerTokenData data; public CreateCustomerToken() { } - public CreateCustomerToken type(String type) { + public CreateCustomerToken data(CreateCustomerTokenData data) { - this.type = type; + this.data = data; return this; } /** - * Get type - * @return type + * Get data + * @return data **/ @javax.annotation.Nullable - public String getType() { - return type; + public CreateCustomerTokenData getData() { + return data; } - public void setType(String type) { - this.type = type; - } - - - public CreateCustomerToken attributes(CreateCustomerTokenAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CreateCustomerTokenAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateCustomerTokenAttributes attributes) { - this.attributes = attributes; + public void setData(CreateCustomerTokenData data) { + this.data = data; } @@ -115,21 +90,19 @@ public boolean equals(Object o) { return false; } CreateCustomerToken createCustomerToken = (CreateCustomerToken) o; - return Objects.equals(this.type, createCustomerToken.type) && - Objects.equals(this.attributes, createCustomerToken.attributes); + return Objects.equals(this.data, createCustomerToken.data); } @Override public int hashCode() { - return Objects.hash(type, attributes); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateCustomerToken {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -152,8 +125,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -180,12 +152,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CreateCustomerTokenAttributes.validateJsonElement(jsonObj.get("attributes")); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateCustomerTokenData.validateJsonElement(jsonObj.get("data")); } } diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest21Data.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenData.java similarity index 69% rename from src/main/java/org/openapitools/client/model/ExecuteRequest21Data.java rename to src/main/java/org/openapitools/client/model/CreateCustomerTokenData.java index 3da53b3a..c9b1514d 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest21Data.java +++ b/src/main/java/org/openapitools/client/model/CreateCustomerTokenData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.ExecuteRequest21DataAttributes; +import org.openapitools.client.model.CreateCustomerTokenDataAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,22 +48,22 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest21Data + * CreateCustomerTokenData */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest21Data { +public class CreateCustomerTokenData { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "checkPaymentReturn"; + private String type = "customerToken"; public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ExecuteRequest21DataAttributes attributes; + private CreateCustomerTokenDataAttributes attributes; - public ExecuteRequest21Data() { + public CreateCustomerTokenData() { } - public ExecuteRequest21Data type(String type) { + public CreateCustomerTokenData type(String type) { this.type = type; return this; @@ -84,7 +84,7 @@ public void setType(String type) { } - public ExecuteRequest21Data attributes(ExecuteRequest21DataAttributes attributes) { + public CreateCustomerTokenData attributes(CreateCustomerTokenDataAttributes attributes) { this.attributes = attributes; return this; @@ -95,12 +95,12 @@ public ExecuteRequest21Data attributes(ExecuteRequest21DataAttributes attributes * @return attributes **/ @javax.annotation.Nullable - public ExecuteRequest21DataAttributes getAttributes() { + public CreateCustomerTokenDataAttributes getAttributes() { return attributes; } - public void setAttributes(ExecuteRequest21DataAttributes attributes) { + public void setAttributes(CreateCustomerTokenDataAttributes attributes) { this.attributes = attributes; } @@ -114,9 +114,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest21Data executeRequest21Data = (ExecuteRequest21Data) o; - return Objects.equals(this.type, executeRequest21Data.type) && - Objects.equals(this.attributes, executeRequest21Data.attributes); + CreateCustomerTokenData createCustomerTokenData = (CreateCustomerTokenData) o; + return Objects.equals(this.type, createCustomerTokenData.type) && + Objects.equals(this.attributes, createCustomerTokenData.attributes); } @Override @@ -127,7 +127,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest21Data {\n"); + sb.append("class CreateCustomerTokenData {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append("}"); @@ -163,20 +163,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest21Data + * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenData */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest21Data.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest21Data is not found in the empty JSON string", ExecuteRequest21Data.openapiRequiredFields.toString())); + if (!CreateCustomerTokenData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenData is not found in the empty JSON string", CreateCustomerTokenData.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest21Data.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest21Data` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateCustomerTokenData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -185,7 +185,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `attributes` if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - ExecuteRequest21DataAttributes.validateJsonElement(jsonObj.get("attributes")); + CreateCustomerTokenDataAttributes.validateJsonElement(jsonObj.get("attributes")); } } @@ -193,22 +193,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest21Data.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest21Data' and its subtypes + if (!CreateCustomerTokenData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCustomerTokenData' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest21Data.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenData.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest21Data value) throws IOException { + public void write(JsonWriter out, CreateCustomerTokenData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest21Data read(JsonReader in) throws IOException { + public CreateCustomerTokenData read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -219,18 +219,18 @@ public ExecuteRequest21Data read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest21Data given an JSON string + * Create an instance of CreateCustomerTokenData given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest21Data - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest21Data + * @return An instance of CreateCustomerTokenData + * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenData */ - public static ExecuteRequest21Data fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest21Data.class); + public static CreateCustomerTokenData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCustomerTokenData.class); } /** - * Convert an instance of ExecuteRequest21Data to an JSON string + * Convert an instance of CreateCustomerTokenData to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerTokenAttributes.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenDataAttributes.java similarity index 77% rename from src/main/java/org/openapitools/client/model/CreateCustomerTokenAttributes.java rename to src/main/java/org/openapitools/client/model/CreateCustomerTokenDataAttributes.java index 4e5c2ef1..3fd5737b 100644 --- a/src/main/java/org/openapitools/client/model/CreateCustomerTokenAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateCustomerTokenDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,7 +23,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.client.model.CreateApiTokenAttributesResourcesInner; +import org.openapitools.client.model.CreateApiTokenDataAttributesResourcesInner; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -50,10 +50,10 @@ import org.openapitools.client.JSON; /** - * CreateCustomerTokenAttributes + * CreateCustomerTokenDataAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCustomerTokenAttributes { +public class CreateCustomerTokenDataAttributes { public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) private String scope; @@ -76,16 +76,16 @@ public class CreateCustomerTokenAttributes { public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; + private List resources; public static final String SERIALIZED_NAME_UPGRADABLE_SCOPE = "upgradableScope"; @SerializedName(SERIALIZED_NAME_UPGRADABLE_SCOPE) private String upgradableScope; - public CreateCustomerTokenAttributes() { + public CreateCustomerTokenDataAttributes() { } - public CreateCustomerTokenAttributes scope(String scope) { + public CreateCustomerTokenDataAttributes scope(String scope) { this.scope = scope; return this; @@ -106,7 +106,7 @@ public void setScope(String scope) { } - public CreateCustomerTokenAttributes verificationToken(String verificationToken) { + public CreateCustomerTokenDataAttributes verificationToken(String verificationToken) { this.verificationToken = verificationToken; return this; @@ -127,7 +127,7 @@ public void setVerificationToken(String verificationToken) { } - public CreateCustomerTokenAttributes jwtToken(String jwtToken) { + public CreateCustomerTokenDataAttributes jwtToken(String jwtToken) { this.jwtToken = jwtToken; return this; @@ -148,7 +148,7 @@ public void setJwtToken(String jwtToken) { } - public CreateCustomerTokenAttributes expiresIn(Integer expiresIn) { + public CreateCustomerTokenDataAttributes expiresIn(Integer expiresIn) { this.expiresIn = expiresIn; return this; @@ -169,7 +169,7 @@ public void setExpiresIn(Integer expiresIn) { } - public CreateCustomerTokenAttributes verificationCode(String verificationCode) { + public CreateCustomerTokenDataAttributes verificationCode(String verificationCode) { this.verificationCode = verificationCode; return this; @@ -190,13 +190,13 @@ public void setVerificationCode(String verificationCode) { } - public CreateCustomerTokenAttributes resources(List resources) { + public CreateCustomerTokenDataAttributes resources(List resources) { this.resources = resources; return this; } - public CreateCustomerTokenAttributes addResourcesItem(CreateApiTokenAttributesResourcesInner resourcesItem) { + public CreateCustomerTokenDataAttributes addResourcesItem(CreateApiTokenDataAttributesResourcesInner resourcesItem) { if (this.resources == null) { this.resources = new ArrayList<>(); } @@ -209,17 +209,17 @@ public CreateCustomerTokenAttributes addResourcesItem(CreateApiTokenAttributesRe * @return resources **/ @javax.annotation.Nullable - public List getResources() { + public List getResources() { return resources; } - public void setResources(List resources) { + public void setResources(List resources) { this.resources = resources; } - public CreateCustomerTokenAttributes upgradableScope(String upgradableScope) { + public CreateCustomerTokenDataAttributes upgradableScope(String upgradableScope) { this.upgradableScope = upgradableScope; return this; @@ -249,14 +249,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateCustomerTokenAttributes createCustomerTokenAttributes = (CreateCustomerTokenAttributes) o; - return Objects.equals(this.scope, createCustomerTokenAttributes.scope) && - Objects.equals(this.verificationToken, createCustomerTokenAttributes.verificationToken) && - Objects.equals(this.jwtToken, createCustomerTokenAttributes.jwtToken) && - Objects.equals(this.expiresIn, createCustomerTokenAttributes.expiresIn) && - Objects.equals(this.verificationCode, createCustomerTokenAttributes.verificationCode) && - Objects.equals(this.resources, createCustomerTokenAttributes.resources) && - Objects.equals(this.upgradableScope, createCustomerTokenAttributes.upgradableScope); + CreateCustomerTokenDataAttributes createCustomerTokenDataAttributes = (CreateCustomerTokenDataAttributes) o; + return Objects.equals(this.scope, createCustomerTokenDataAttributes.scope) && + Objects.equals(this.verificationToken, createCustomerTokenDataAttributes.verificationToken) && + Objects.equals(this.jwtToken, createCustomerTokenDataAttributes.jwtToken) && + Objects.equals(this.expiresIn, createCustomerTokenDataAttributes.expiresIn) && + Objects.equals(this.verificationCode, createCustomerTokenDataAttributes.verificationCode) && + Objects.equals(this.resources, createCustomerTokenDataAttributes.resources) && + Objects.equals(this.upgradableScope, createCustomerTokenDataAttributes.upgradableScope); } @Override @@ -267,7 +267,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateCustomerTokenAttributes {\n"); + sb.append("class CreateCustomerTokenDataAttributes {\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" verificationToken: ").append(toIndentedString(verificationToken)).append("\n"); sb.append(" jwtToken: ").append(toIndentedString(jwtToken)).append("\n"); @@ -313,20 +313,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenAttributes + * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenDataAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateCustomerTokenAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenAttributes is not found in the empty JSON string", CreateCustomerTokenAttributes.openapiRequiredFields.toString())); + if (!CreateCustomerTokenDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenDataAttributes is not found in the empty JSON string", CreateCustomerTokenDataAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateCustomerTokenAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateCustomerTokenDataAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -352,7 +352,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `resources` (array) for (int i = 0; i < jsonArrayresources.size(); i++) { - CreateApiTokenAttributesResourcesInner.validateJsonElement(jsonArrayresources.get(i)); + CreateApiTokenDataAttributesResourcesInner.validateJsonElement(jsonArrayresources.get(i)); }; } } @@ -365,22 +365,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCustomerTokenAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCustomerTokenAttributes' and its subtypes + if (!CreateCustomerTokenDataAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCustomerTokenDataAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenDataAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateCustomerTokenAttributes value) throws IOException { + public void write(JsonWriter out, CreateCustomerTokenDataAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateCustomerTokenAttributes read(JsonReader in) throws IOException { + public CreateCustomerTokenDataAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -391,18 +391,18 @@ public CreateCustomerTokenAttributes read(JsonReader in) throws IOException { } /** - * Create an instance of CreateCustomerTokenAttributes given an JSON string + * Create an instance of CreateCustomerTokenDataAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of CreateCustomerTokenAttributes - * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenAttributes + * @return An instance of CreateCustomerTokenDataAttributes + * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenDataAttributes */ - public static CreateCustomerTokenAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCustomerTokenAttributes.class); + public static CreateCustomerTokenDataAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCustomerTokenDataAttributes.class); } /** - * Convert an instance of CreateCustomerTokenAttributes to an JSON string + * Convert an instance of CreateCustomerTokenDataAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerification.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerification.java index f6e9bc78..be22b104 100644 --- a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerification.java +++ b/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerification.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateCustomerTokenVerificationAttributes; +import org.openapitools.client.model.CreateCustomerTokenVerificationData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,56 +52,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateCustomerTokenVerification { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "customerTokenVerification"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateCustomerTokenVerificationAttributes attributes; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateCustomerTokenVerificationData data; public CreateCustomerTokenVerification() { } - public CreateCustomerTokenVerification type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateCustomerTokenVerification attributes(CreateCustomerTokenVerificationAttributes attributes) { + public CreateCustomerTokenVerification data(CreateCustomerTokenVerificationData data) { - this.attributes = attributes; + this.data = data; return this; } /** - * Get attributes - * @return attributes + * Get data + * @return data **/ - @javax.annotation.Nonnull - public CreateCustomerTokenVerificationAttributes getAttributes() { - return attributes; + @javax.annotation.Nullable + public CreateCustomerTokenVerificationData getData() { + return data; } - public void setAttributes(CreateCustomerTokenVerificationAttributes attributes) { - this.attributes = attributes; + public void setData(CreateCustomerTokenVerificationData data) { + this.data = data; } @@ -115,21 +90,19 @@ public boolean equals(Object o) { return false; } CreateCustomerTokenVerification createCustomerTokenVerification = (CreateCustomerTokenVerification) o; - return Objects.equals(this.type, createCustomerTokenVerification.type) && - Objects.equals(this.attributes, createCustomerTokenVerification.attributes); + return Objects.equals(this.data, createCustomerTokenVerification.data); } @Override public int hashCode() { - return Objects.hash(type, attributes); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateCustomerTokenVerification {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -152,13 +125,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); } /** @@ -181,19 +151,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenVerification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCustomerTokenVerification.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateCustomerTokenVerificationData.validateJsonElement(jsonObj.get("data")); } - // validate the required field `attributes` - CreateCustomerTokenVerificationAttributes.validateJsonElement(jsonObj.get("attributes")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationData.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationData.java new file mode 100644 index 00000000..8deb241a --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationData.java @@ -0,0 +1,248 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateCustomerTokenVerificationDataAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * CreateCustomerTokenVerificationData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomerTokenVerificationData { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "customerTokenVerification"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateCustomerTokenVerificationDataAttributes attributes; + + public CreateCustomerTokenVerificationData() { + } + + public CreateCustomerTokenVerificationData type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public CreateCustomerTokenVerificationData attributes(CreateCustomerTokenVerificationDataAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nonnull + public CreateCustomerTokenVerificationDataAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(CreateCustomerTokenVerificationDataAttributes attributes) { + this.attributes = attributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomerTokenVerificationData createCustomerTokenVerificationData = (CreateCustomerTokenVerificationData) o; + return Objects.equals(this.type, createCustomerTokenVerificationData.type) && + Objects.equals(this.attributes, createCustomerTokenVerificationData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomerTokenVerificationData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenVerificationData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCustomerTokenVerificationData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenVerificationData is not found in the empty JSON string", CreateCustomerTokenVerificationData.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateCustomerTokenVerificationData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenVerificationData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCustomerTokenVerificationData.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `attributes` + CreateCustomerTokenVerificationDataAttributes.validateJsonElement(jsonObj.get("attributes")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCustomerTokenVerificationData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCustomerTokenVerificationData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenVerificationData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCustomerTokenVerificationData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateCustomerTokenVerificationData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCustomerTokenVerificationData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCustomerTokenVerificationData + * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenVerificationData + */ + public static CreateCustomerTokenVerificationData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCustomerTokenVerificationData.class); + } + + /** + * Convert an instance of CreateCustomerTokenVerificationData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationAttributes.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationDataAttributes.java similarity index 82% rename from src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationAttributes.java rename to src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationDataAttributes.java index cb38a13f..de674d8f 100644 --- a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -48,10 +48,10 @@ import org.openapitools.client.JSON; /** - * CreateCustomerTokenVerificationAttributes + * CreateCustomerTokenVerificationDataAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCustomerTokenVerificationAttributes { +public class CreateCustomerTokenVerificationDataAttributes { /** * Gets or Sets channel */ @@ -240,10 +240,10 @@ public LanguageEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_LANGUAGE) private LanguageEnum language; - public CreateCustomerTokenVerificationAttributes() { + public CreateCustomerTokenVerificationDataAttributes() { } - public CreateCustomerTokenVerificationAttributes channel(ChannelEnum channel) { + public CreateCustomerTokenVerificationDataAttributes channel(ChannelEnum channel) { this.channel = channel; return this; @@ -264,7 +264,7 @@ public void setChannel(ChannelEnum channel) { } - public CreateCustomerTokenVerificationAttributes phone(Phone phone) { + public CreateCustomerTokenVerificationDataAttributes phone(Phone phone) { this.phone = phone; return this; @@ -285,7 +285,7 @@ public void setPhone(Phone phone) { } - public CreateCustomerTokenVerificationAttributes appHash(String appHash) { + public CreateCustomerTokenVerificationDataAttributes appHash(String appHash) { this.appHash = appHash; return this; @@ -306,7 +306,7 @@ public void setAppHash(String appHash) { } - public CreateCustomerTokenVerificationAttributes language(LanguageEnum language) { + public CreateCustomerTokenVerificationDataAttributes language(LanguageEnum language) { this.language = language; return this; @@ -336,11 +336,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateCustomerTokenVerificationAttributes createCustomerTokenVerificationAttributes = (CreateCustomerTokenVerificationAttributes) o; - return Objects.equals(this.channel, createCustomerTokenVerificationAttributes.channel) && - Objects.equals(this.phone, createCustomerTokenVerificationAttributes.phone) && - Objects.equals(this.appHash, createCustomerTokenVerificationAttributes.appHash) && - Objects.equals(this.language, createCustomerTokenVerificationAttributes.language); + CreateCustomerTokenVerificationDataAttributes createCustomerTokenVerificationDataAttributes = (CreateCustomerTokenVerificationDataAttributes) o; + return Objects.equals(this.channel, createCustomerTokenVerificationDataAttributes.channel) && + Objects.equals(this.phone, createCustomerTokenVerificationDataAttributes.phone) && + Objects.equals(this.appHash, createCustomerTokenVerificationDataAttributes.appHash) && + Objects.equals(this.language, createCustomerTokenVerificationDataAttributes.language); } @Override @@ -351,7 +351,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateCustomerTokenVerificationAttributes {\n"); + sb.append("class CreateCustomerTokenVerificationDataAttributes {\n"); sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" appHash: ").append(toIndentedString(appHash)).append("\n"); @@ -392,25 +392,25 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenVerificationAttributes + * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenVerificationDataAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateCustomerTokenVerificationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenVerificationAttributes is not found in the empty JSON string", CreateCustomerTokenVerificationAttributes.openapiRequiredFields.toString())); + if (!CreateCustomerTokenVerificationDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenVerificationDataAttributes is not found in the empty JSON string", CreateCustomerTokenVerificationDataAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateCustomerTokenVerificationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenVerificationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateCustomerTokenVerificationDataAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenVerificationDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCustomerTokenVerificationAttributes.openapiRequiredFields) { + for (String requiredField : CreateCustomerTokenVerificationDataAttributes.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -435,22 +435,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCustomerTokenVerificationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCustomerTokenVerificationAttributes' and its subtypes + if (!CreateCustomerTokenVerificationDataAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCustomerTokenVerificationDataAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenVerificationAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenVerificationDataAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateCustomerTokenVerificationAttributes value) throws IOException { + public void write(JsonWriter out, CreateCustomerTokenVerificationDataAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateCustomerTokenVerificationAttributes read(JsonReader in) throws IOException { + public CreateCustomerTokenVerificationDataAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -461,18 +461,18 @@ public CreateCustomerTokenVerificationAttributes read(JsonReader in) throws IOEx } /** - * Create an instance of CreateCustomerTokenVerificationAttributes given an JSON string + * Create an instance of CreateCustomerTokenVerificationDataAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of CreateCustomerTokenVerificationAttributes - * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenVerificationAttributes + * @return An instance of CreateCustomerTokenVerificationDataAttributes + * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenVerificationDataAttributes */ - public static CreateCustomerTokenVerificationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCustomerTokenVerificationAttributes.class); + public static CreateCustomerTokenVerificationDataAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCustomerTokenVerificationDataAttributes.class); } /** - * Convert an instance of CreateCustomerTokenVerificationAttributes to an JSON string + * Convert an instance of CreateCustomerTokenVerificationDataAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateDepositAccount.java b/src/main/java/org/openapitools/client/model/CreateDepositAccount.java index e9feb0a8..ffd3f8bb 100644 --- a/src/main/java/org/openapitools/client/model/CreateDepositAccount.java +++ b/src/main/java/org/openapitools/client/model/CreateDepositAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateDepositAccountAttributes.java b/src/main/java/org/openapitools/client/model/CreateDepositAccountAttributes.java index e5a5329f..494b5bfb 100644 --- a/src/main/java/org/openapitools/client/model/CreateDepositAccountAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateDepositAccountAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateDepositAccountRelationships.java b/src/main/java/org/openapitools/client/model/CreateDepositAccountRelationships.java index 41d78420..a18e7841 100644 --- a/src/main/java/org/openapitools/client/model/CreateDepositAccountRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateDepositAccountRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateFeeRelationships.java b/src/main/java/org/openapitools/client/model/CreateFeeRelationships.java deleted file mode 100644 index 32e0f470..00000000 --- a/src/main/java/org/openapitools/client/model/CreateFeeRelationships.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateFeeRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateFeeRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationship account; - - public CreateFeeRelationships() { - } - - public CreateFeeRelationships account(Relationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public Relationship getAccount() { - return account; - } - - - public void setAccount(Relationship account) { - this.account = account; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateFeeRelationships createFeeRelationships = (CreateFeeRelationships) o; - return Objects.equals(this.account, createFeeRelationships.account); - } - - @Override - public int hashCode() { - return Objects.hash(account); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateFeeRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateFeeRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateFeeRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateFeeRelationships is not found in the empty JSON string", CreateFeeRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateFeeRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateFeeRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateFeeRelationships.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `account` - Relationship.validateJsonElement(jsonObj.get("account")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateFeeRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateFeeRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateFeeRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateFeeRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateFeeRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateFeeRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateFeeRelationships - * @throws IOException if the JSON string is invalid with respect to CreateFeeRelationships - */ - public static CreateFeeRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateFeeRelationships.class); - } - - /** - * Convert an instance of CreateFeeRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualApplication.java b/src/main/java/org/openapitools/client/model/CreateIndividualApplication.java index bf17d2b1..ddd6cf96 100644 --- a/src/main/java/org/openapitools/client/model/CreateIndividualApplication.java +++ b/src/main/java/org/openapitools/client/model/CreateIndividualApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualApplicationAttributes.java b/src/main/java/org/openapitools/client/model/CreateIndividualApplicationAttributes.java index ebdef679..db3bb78d 100644 --- a/src/main/java/org/openapitools/client/model/CreateIndividualApplicationAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateIndividualApplicationAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualDebitCard.java b/src/main/java/org/openapitools/client/model/CreateIndividualDebitCard.java index cf9e1e07..e9caec0c 100644 --- a/src/main/java/org/openapitools/client/model/CreateIndividualDebitCard.java +++ b/src/main/java/org/openapitools/client/model/CreateIndividualDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -58,17 +58,7 @@ public class CreateIndividualDebitCard { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - INDIVIDUALDEBITCARD("individualDebitCard"), - - BUSINESSDEBITCARD("businessDebitCard"), - - BUSINESSCREDITCARD("businessCreditCard"), - - INDIVIDUALVIRTUALDEBITCARD("individualVirtualDebitCard"), - - BUSINESSVIRTUALDEBITCARD("businessVirtualDebitCard"), - - BUSINESSVIRTUALCREDITCARD("businessVirtualCreditCard"); + INDIVIDUALDEBITCARD("individualDebitCard"); private String value; diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/CreateIndividualDebitCardAttributes.java index ef2ddd04..18086843 100644 --- a/src/main/java/org/openapitools/client/model/CreateIndividualDebitCardAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateIndividualDebitCardAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCard.java index dd3ea0f7..b421bc66 100644 --- a/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCard.java +++ b/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCardAttributes.java index 90a65b6e..e55e25d5 100644 --- a/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCardAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCardAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateOfficer.java b/src/main/java/org/openapitools/client/model/CreateOfficer.java index 443cc4d9..93f72a8a 100644 --- a/src/main/java/org/openapitools/client/model/CreateOfficer.java +++ b/src/main/java/org/openapitools/client/model/CreateOfficer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreatePayment.java b/src/main/java/org/openapitools/client/model/CreatePayment.java index a98dae7e..de7f9299 100644 --- a/src/main/java/org/openapitools/client/model/CreatePayment.java +++ b/src/main/java/org/openapitools/client/model/CreatePayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,415 +21,115 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateAchPayment; -import org.openapitools.client.model.CreateAchPaymentCounterparty; -import org.openapitools.client.model.CreateAchPaymentPlaid; -import org.openapitools.client.model.CreateAchPaymentRelationships; -import org.openapitools.client.model.CreateBillPayment; -import org.openapitools.client.model.CreateBookPayment; -import org.openapitools.client.model.CreatePushToCardPayment; -import org.openapitools.client.model.CreatePushToCardPaymentAttributes; -import org.openapitools.client.model.CreateWirePayment; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.model.CreatePaymentData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.JsonArray; import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.openapitools.client.JSON; +/** + * CreatePayment + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePayment extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreatePayment.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateAchPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPayment.class)); - final TypeAdapter adapterCreateAchPaymentCounterparty = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentCounterparty.class)); - final TypeAdapter adapterCreateAchPaymentPlaid = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentPlaid.class)); - final TypeAdapter adapterCreateBookPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateBookPayment.class)); - final TypeAdapter adapterCreateWirePayment = gson.getDelegateAdapter(this, TypeToken.get(CreateWirePayment.class)); - final TypeAdapter adapterCreateBillPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateBillPayment.class)); - final TypeAdapter adapterCreatePushToCardPayment = gson.getDelegateAdapter(this, TypeToken.get(CreatePushToCardPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePayment value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `CreateAchPayment` - if (value.getActualInstance() instanceof CreateAchPayment) { - JsonElement element = adapterCreateAchPayment.toJsonTree((CreateAchPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateAchPaymentCounterparty` - if (value.getActualInstance() instanceof CreateAchPaymentCounterparty) { - JsonElement element = adapterCreateAchPaymentCounterparty.toJsonTree((CreateAchPaymentCounterparty)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateAchPaymentPlaid` - if (value.getActualInstance() instanceof CreateAchPaymentPlaid) { - JsonElement element = adapterCreateAchPaymentPlaid.toJsonTree((CreateAchPaymentPlaid)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBookPayment` - if (value.getActualInstance() instanceof CreateBookPayment) { - JsonElement element = adapterCreateBookPayment.toJsonTree((CreateBookPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateWirePayment` - if (value.getActualInstance() instanceof CreateWirePayment) { - JsonElement element = adapterCreateWirePayment.toJsonTree((CreateWirePayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBillPayment` - if (value.getActualInstance() instanceof CreateBillPayment) { - JsonElement element = adapterCreateBillPayment.toJsonTree((CreateBillPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreatePushToCardPayment` - if (value.getActualInstance() instanceof CreatePushToCardPayment) { - JsonElement element = adapterCreatePushToCardPayment.toJsonTree((CreatePushToCardPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment"); - } - - @Override - public CreatePayment read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); +public class CreatePayment { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreatePaymentData data; - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize CreateAchPayment - try { - // validate the JSON object to see if any exception is thrown - CreateAchPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateAchPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateAchPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateAchPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateAchPayment'", e); - } - // deserialize CreateAchPaymentCounterparty - try { - // validate the JSON object to see if any exception is thrown - CreateAchPaymentCounterparty.validateJsonElement(jsonElement); - actualAdapter = adapterCreateAchPaymentCounterparty; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateAchPaymentCounterparty'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateAchPaymentCounterparty failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateAchPaymentCounterparty'", e); - } - // deserialize CreateAchPaymentPlaid - try { - // validate the JSON object to see if any exception is thrown - CreateAchPaymentPlaid.validateJsonElement(jsonElement); - actualAdapter = adapterCreateAchPaymentPlaid; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateAchPaymentPlaid'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateAchPaymentPlaid failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateAchPaymentPlaid'", e); - } - // deserialize CreateBookPayment - try { - // validate the JSON object to see if any exception is thrown - CreateBookPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBookPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBookPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBookPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBookPayment'", e); - } - // deserialize CreateWirePayment - try { - // validate the JSON object to see if any exception is thrown - CreateWirePayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateWirePayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateWirePayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateWirePayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateWirePayment'", e); - } - // deserialize CreateBillPayment - try { - // validate the JSON object to see if any exception is thrown - CreateBillPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBillPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBillPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBillPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBillPayment'", e); - } - // deserialize CreatePushToCardPayment - try { - // validate the JSON object to see if any exception is thrown - CreatePushToCardPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreatePushToCardPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreatePushToCardPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreatePushToCardPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreatePushToCardPayment'", e); - } - - if (match == 1) { - CreatePayment ret = new CreatePayment(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreatePayment: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } + public CreatePayment() { + } - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); + public CreatePayment data(CreatePaymentData data) { + + this.data = data; + return this; + } - public CreatePayment() { - super("oneOf", Boolean.FALSE); - } + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public CreatePaymentData getData() { + return data; + } - public CreatePayment(CreateAchPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public CreatePayment(CreateAchPaymentCounterparty o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + public void setData(CreatePaymentData data) { + this.data = data; + } - public CreatePayment(CreateAchPaymentPlaid o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public CreatePayment(CreateBillPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public CreatePayment(CreateBookPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - - public CreatePayment(CreatePushToCardPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); + if (o == null || getClass() != o.getClass()) { + return false; } + CreatePayment createPayment = (CreatePayment) o; + return Objects.equals(this.data, createPayment.data); + } - public CreatePayment(CreateWirePayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + @Override + public int hashCode() { + return Objects.hash(data); + } - static { - schemas.put("CreateAchPayment", CreateAchPayment.class); - schemas.put("CreateAchPaymentCounterparty", CreateAchPaymentCounterparty.class); - schemas.put("CreateAchPaymentPlaid", CreateAchPaymentPlaid.class); - schemas.put("CreateBookPayment", CreateBookPayment.class); - schemas.put("CreateWirePayment", CreateWirePayment.class); - schemas.put("CreateBillPayment", CreateBillPayment.class); - schemas.put("CreatePushToCardPayment", CreatePushToCardPayment.class); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePayment {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } - @Override - public Map> getSchemas() { - return CreatePayment.schemas; + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; } + return o.toString().replace("\n", "\n "); + } - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateAchPayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateAchPaymentCounterparty) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateAchPaymentPlaid) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBookPayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateWirePayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBillPayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreatePushToCardPayment) { - super.setActualInstance(instance); - return; - } - throw new RuntimeException("Invalid instance type. Must be CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment"); - } + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; - /** - * Get the actual instance, which can be the following: - * CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment - * - * @return The actual instance (CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); - /** - * Get the actual instance of `CreateAchPayment`. If the actual instance is not `CreateAchPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateAchPayment` - * @throws ClassCastException if the instance is not `CreateAchPayment` - */ - public CreateAchPayment getCreateAchPayment() throws ClassCastException { - return (CreateAchPayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateAchPaymentCounterparty`. If the actual instance is not `CreateAchPaymentCounterparty`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateAchPaymentCounterparty` - * @throws ClassCastException if the instance is not `CreateAchPaymentCounterparty` - */ - public CreateAchPaymentCounterparty getCreateAchPaymentCounterparty() throws ClassCastException { - return (CreateAchPaymentCounterparty)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateAchPaymentPlaid`. If the actual instance is not `CreateAchPaymentPlaid`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateAchPaymentPlaid` - * @throws ClassCastException if the instance is not `CreateAchPaymentPlaid` - */ - public CreateAchPaymentPlaid getCreateAchPaymentPlaid() throws ClassCastException { - return (CreateAchPaymentPlaid)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBookPayment`. If the actual instance is not `CreateBookPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBookPayment` - * @throws ClassCastException if the instance is not `CreateBookPayment` - */ - public CreateBookPayment getCreateBookPayment() throws ClassCastException { - return (CreateBookPayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateWirePayment`. If the actual instance is not `CreateWirePayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateWirePayment` - * @throws ClassCastException if the instance is not `CreateWirePayment` - */ - public CreateWirePayment getCreateWirePayment() throws ClassCastException { - return (CreateWirePayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBillPayment`. If the actual instance is not `CreateBillPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBillPayment` - * @throws ClassCastException if the instance is not `CreateBillPayment` - */ - public CreateBillPayment getCreateBillPayment() throws ClassCastException { - return (CreateBillPayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreatePushToCardPayment`. If the actual instance is not `CreatePushToCardPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreatePushToCardPayment` - * @throws ClassCastException if the instance is not `CreatePushToCardPayment` - */ - public CreatePushToCardPayment getCreatePushToCardPayment() throws ClassCastException { - return (CreatePushToCardPayment)super.getActualInstance(); - } + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } /** * Validates the JSON Element and throws an exception if issues found @@ -438,67 +138,52 @@ public CreatePushToCardPayment getCreatePushToCardPayment() throws ClassCastExce * @throws IOException if the JSON Element is invalid with respect to CreatePayment */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateAchPayment - try { - CreateAchPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateAchPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateAchPaymentCounterparty - try { - CreateAchPaymentCounterparty.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateAchPaymentCounterparty failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateAchPaymentPlaid - try { - CreateAchPaymentPlaid.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateAchPaymentPlaid failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBookPayment - try { - CreateBookPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBookPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateWirePayment - try { - CreateWirePayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateWirePayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBillPayment - try { - CreateBillPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBillPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreatePushToCardPayment - try { - CreatePushToCardPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreatePushToCardPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreatePayment with oneOf schemas: CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + if (jsonElement == null) { + if (!CreatePayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePayment is not found in the empty JSON string", CreatePayment.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreatePayment.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreatePayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreatePaymentData.validateJsonElement(jsonObj.get("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreatePayment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreatePayment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreatePayment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreatePayment value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreatePayment read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } } diff --git a/src/main/java/org/openapitools/client/model/CreatePaymentData.java b/src/main/java/org/openapitools/client/model/CreatePaymentData.java new file mode 100644 index 00000000..d613af0c --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreatePaymentData.java @@ -0,0 +1,525 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateAchPayment; +import org.openapitools.client.model.CreateAchPaymentCounterparty; +import org.openapitools.client.model.CreateAchPaymentPlaid; +import org.openapitools.client.model.CreateAchPaymentRelationships; +import org.openapitools.client.model.CreateBillPayment; +import org.openapitools.client.model.CreateBookPayment; +import org.openapitools.client.model.CreatePushToCardPayment; +import org.openapitools.client.model.CreatePushToCardPaymentAttributes; +import org.openapitools.client.model.CreateWirePayment; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import org.openapitools.client.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreatePaymentData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreatePaymentData.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreatePaymentData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreatePaymentData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterCreateAchPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPayment.class)); + final TypeAdapter adapterCreateAchPaymentCounterparty = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentCounterparty.class)); + final TypeAdapter adapterCreateAchPaymentPlaid = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentPlaid.class)); + final TypeAdapter adapterCreateBookPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateBookPayment.class)); + final TypeAdapter adapterCreateWirePayment = gson.getDelegateAdapter(this, TypeToken.get(CreateWirePayment.class)); + final TypeAdapter adapterCreateBillPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateBillPayment.class)); + final TypeAdapter adapterCreatePushToCardPayment = gson.getDelegateAdapter(this, TypeToken.get(CreatePushToCardPayment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreatePaymentData value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `CreateAchPayment` + if (value.getActualInstance() instanceof CreateAchPayment) { + JsonElement element = adapterCreateAchPayment.toJsonTree((CreateAchPayment)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateAchPaymentCounterparty` + if (value.getActualInstance() instanceof CreateAchPaymentCounterparty) { + JsonElement element = adapterCreateAchPaymentCounterparty.toJsonTree((CreateAchPaymentCounterparty)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateAchPaymentPlaid` + if (value.getActualInstance() instanceof CreateAchPaymentPlaid) { + JsonElement element = adapterCreateAchPaymentPlaid.toJsonTree((CreateAchPaymentPlaid)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateBookPayment` + if (value.getActualInstance() instanceof CreateBookPayment) { + JsonElement element = adapterCreateBookPayment.toJsonTree((CreateBookPayment)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateWirePayment` + if (value.getActualInstance() instanceof CreateWirePayment) { + JsonElement element = adapterCreateWirePayment.toJsonTree((CreateWirePayment)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateBillPayment` + if (value.getActualInstance() instanceof CreateBillPayment) { + JsonElement element = adapterCreateBillPayment.toJsonTree((CreateBillPayment)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreatePushToCardPayment` + if (value.getActualInstance() instanceof CreatePushToCardPayment) { + JsonElement element = adapterCreatePushToCardPayment.toJsonTree((CreatePushToCardPayment)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment"); + } + + @Override + public CreatePaymentData read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize CreateAchPayment + try { + // validate the JSON object to see if any exception is thrown + CreateAchPayment.validateJsonElement(jsonElement); + actualAdapter = adapterCreateAchPayment; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateAchPayment'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateAchPayment failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateAchPayment'", e); + } + // deserialize CreateAchPaymentCounterparty + try { + // validate the JSON object to see if any exception is thrown + CreateAchPaymentCounterparty.validateJsonElement(jsonElement); + actualAdapter = adapterCreateAchPaymentCounterparty; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateAchPaymentCounterparty'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateAchPaymentCounterparty failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateAchPaymentCounterparty'", e); + } + // deserialize CreateAchPaymentPlaid + try { + // validate the JSON object to see if any exception is thrown + CreateAchPaymentPlaid.validateJsonElement(jsonElement); + actualAdapter = adapterCreateAchPaymentPlaid; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateAchPaymentPlaid'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateAchPaymentPlaid failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateAchPaymentPlaid'", e); + } + // deserialize CreateBookPayment + try { + // validate the JSON object to see if any exception is thrown + CreateBookPayment.validateJsonElement(jsonElement); + actualAdapter = adapterCreateBookPayment; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBookPayment'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateBookPayment failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateBookPayment'", e); + } + // deserialize CreateWirePayment + try { + // validate the JSON object to see if any exception is thrown + CreateWirePayment.validateJsonElement(jsonElement); + actualAdapter = adapterCreateWirePayment; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateWirePayment'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateWirePayment failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateWirePayment'", e); + } + // deserialize CreateBillPayment + try { + // validate the JSON object to see if any exception is thrown + CreateBillPayment.validateJsonElement(jsonElement); + actualAdapter = adapterCreateBillPayment; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBillPayment'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateBillPayment failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateBillPayment'", e); + } + // deserialize CreatePushToCardPayment + try { + // validate the JSON object to see if any exception is thrown + CreatePushToCardPayment.validateJsonElement(jsonElement); + actualAdapter = adapterCreatePushToCardPayment; + match++; + log.log(Level.FINER, "Input data matches schema 'CreatePushToCardPayment'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreatePushToCardPayment failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreatePushToCardPayment'", e); + } + + if (match == 1) { + CreatePaymentData ret = new CreatePaymentData(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for CreatePaymentData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public CreatePaymentData() { + super("oneOf", Boolean.FALSE); + } + + public CreatePaymentData(CreateAchPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateAchPaymentCounterparty o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateAchPaymentPlaid o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateBillPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateBookPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreatePushToCardPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateWirePayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateAchPayment", CreateAchPayment.class); + schemas.put("CreateAchPaymentCounterparty", CreateAchPaymentCounterparty.class); + schemas.put("CreateAchPaymentPlaid", CreateAchPaymentPlaid.class); + schemas.put("CreateBookPayment", CreateBookPayment.class); + schemas.put("CreateWirePayment", CreateWirePayment.class); + schemas.put("CreateBillPayment", CreateBillPayment.class); + schemas.put("CreatePushToCardPayment", CreatePushToCardPayment.class); + } + + @Override + public Map> getSchemas() { + return CreatePaymentData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof CreateAchPayment) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateAchPaymentCounterparty) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateAchPaymentPlaid) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateBookPayment) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateWirePayment) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateBillPayment) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreatePushToCardPayment) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment"); + } + + /** + * Get the actual instance, which can be the following: + * CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment + * + * @return The actual instance (CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateAchPayment`. If the actual instance is not `CreateAchPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateAchPayment` + * @throws ClassCastException if the instance is not `CreateAchPayment` + */ + public CreateAchPayment getCreateAchPayment() throws ClassCastException { + return (CreateAchPayment)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateAchPaymentCounterparty`. If the actual instance is not `CreateAchPaymentCounterparty`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateAchPaymentCounterparty` + * @throws ClassCastException if the instance is not `CreateAchPaymentCounterparty` + */ + public CreateAchPaymentCounterparty getCreateAchPaymentCounterparty() throws ClassCastException { + return (CreateAchPaymentCounterparty)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateAchPaymentPlaid`. If the actual instance is not `CreateAchPaymentPlaid`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateAchPaymentPlaid` + * @throws ClassCastException if the instance is not `CreateAchPaymentPlaid` + */ + public CreateAchPaymentPlaid getCreateAchPaymentPlaid() throws ClassCastException { + return (CreateAchPaymentPlaid)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateBookPayment`. If the actual instance is not `CreateBookPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBookPayment` + * @throws ClassCastException if the instance is not `CreateBookPayment` + */ + public CreateBookPayment getCreateBookPayment() throws ClassCastException { + return (CreateBookPayment)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateWirePayment`. If the actual instance is not `CreateWirePayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateWirePayment` + * @throws ClassCastException if the instance is not `CreateWirePayment` + */ + public CreateWirePayment getCreateWirePayment() throws ClassCastException { + return (CreateWirePayment)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateBillPayment`. If the actual instance is not `CreateBillPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBillPayment` + * @throws ClassCastException if the instance is not `CreateBillPayment` + */ + public CreateBillPayment getCreateBillPayment() throws ClassCastException { + return (CreateBillPayment)super.getActualInstance(); + } + /** + * Get the actual instance of `CreatePushToCardPayment`. If the actual instance is not `CreatePushToCardPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreatePushToCardPayment` + * @throws ClassCastException if the instance is not `CreatePushToCardPayment` + */ + public CreatePushToCardPayment getCreatePushToCardPayment() throws ClassCastException { + return (CreatePushToCardPayment)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreatePaymentData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with CreateAchPayment + try { + CreateAchPayment.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateAchPayment failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateAchPaymentCounterparty + try { + CreateAchPaymentCounterparty.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateAchPaymentCounterparty failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateAchPaymentPlaid + try { + CreateAchPaymentPlaid.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateAchPaymentPlaid failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateBookPayment + try { + CreateBookPayment.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateBookPayment failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateWirePayment + try { + CreateWirePayment.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateWirePayment failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateBillPayment + try { + CreateBillPayment.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateBillPayment failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreatePushToCardPayment + try { + CreatePushToCardPayment.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreatePushToCardPayment failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for CreatePaymentData with oneOf schemas: CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of CreatePaymentData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreatePaymentData + * @throws IOException if the JSON string is invalid with respect to CreatePaymentData + */ + public static CreatePaymentData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreatePaymentData.class); + } + + /** + * Convert an instance of CreatePaymentData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreatePlaidCounterparty.java b/src/main/java/org/openapitools/client/model/CreatePlaidCounterparty.java index f868f479..ce9efcbc 100644 --- a/src/main/java/org/openapitools/client/model/CreatePlaidCounterparty.java +++ b/src/main/java/org/openapitools/client/model/CreatePlaidCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreatePlaidCounterpartyAttributes.java b/src/main/java/org/openapitools/client/model/CreatePlaidCounterpartyAttributes.java index 4357a796..7037ecb0 100644 --- a/src/main/java/org/openapitools/client/model/CreatePlaidCounterpartyAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreatePlaidCounterpartyAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreatePowerOfAttorneyAgent.java b/src/main/java/org/openapitools/client/model/CreatePowerOfAttorneyAgent.java index db368b82..715e22ab 100644 --- a/src/main/java/org/openapitools/client/model/CreatePowerOfAttorneyAgent.java +++ b/src/main/java/org/openapitools/client/model/CreatePowerOfAttorneyAgent.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreatePushToCardPayment.java b/src/main/java/org/openapitools/client/model/CreatePushToCardPayment.java index c8aabc68..b3d989ba 100644 --- a/src/main/java/org/openapitools/client/model/CreatePushToCardPayment.java +++ b/src/main/java/org/openapitools/client/model/CreatePushToCardPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributes.java index f05a70d1..551ef853 100644 --- a/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributesConfiguration.java b/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributesConfiguration.java index d8657f3b..648f6484 100644 --- a/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributesConfiguration.java +++ b/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributesConfiguration.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPayment.java b/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPayment.java new file mode 100644 index 00000000..e5a7a6cc --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPayment.java @@ -0,0 +1,280 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateAchPaymentCounterpartyRelationships; +import org.openapitools.client.model.CreateRecurringCreditAchPaymentAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * CreateRecurringCreditAchPayment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringCreditAchPayment { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "recurringCreditAchPayment"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateRecurringCreditAchPaymentAttributes attributes; + + public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; + @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) + private CreateAchPaymentCounterpartyRelationships relationships; + + public CreateRecurringCreditAchPayment() { + } + + public CreateRecurringCreditAchPayment type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public CreateRecurringCreditAchPayment attributes(CreateRecurringCreditAchPaymentAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nonnull + public CreateRecurringCreditAchPaymentAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(CreateRecurringCreditAchPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateRecurringCreditAchPayment relationships(CreateAchPaymentCounterpartyRelationships relationships) { + + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @javax.annotation.Nonnull + public CreateAchPaymentCounterpartyRelationships getRelationships() { + return relationships; + } + + + public void setRelationships(CreateAchPaymentCounterpartyRelationships relationships) { + this.relationships = relationships; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringCreditAchPayment createRecurringCreditAchPayment = (CreateRecurringCreditAchPayment) o; + return Objects.equals(this.type, createRecurringCreditAchPayment.type) && + Objects.equals(this.attributes, createRecurringCreditAchPayment.attributes) && + Objects.equals(this.relationships, createRecurringCreditAchPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringCreditAchPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + openapiFields.add("relationships"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); + openapiRequiredFields.add("relationships"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRecurringCreditAchPayment + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRecurringCreditAchPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringCreditAchPayment is not found in the empty JSON string", CreateRecurringCreditAchPayment.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateRecurringCreditAchPayment.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringCreditAchPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRecurringCreditAchPayment.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `attributes` + CreateRecurringCreditAchPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); + // validate the required field `relationships` + CreateAchPaymentCounterpartyRelationships.validateJsonElement(jsonObj.get("relationships")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRecurringCreditAchPayment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRecurringCreditAchPayment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditAchPayment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRecurringCreditAchPayment value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRecurringCreditAchPayment read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRecurringCreditAchPayment given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRecurringCreditAchPayment + * @throws IOException if the JSON string is invalid with respect to CreateRecurringCreditAchPayment + */ + public static CreateRecurringCreditAchPayment fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRecurringCreditAchPayment.class); + } + + /** + * Convert an instance of CreateRecurringCreditAchPayment to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateFeeAttributes.java b/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPaymentAttributes.java similarity index 59% rename from src/main/java/org/openapitools/client/model/CreateFeeAttributes.java rename to src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPaymentAttributes.java index 83061f7c..322d89cb 100644 --- a/src/main/java/org/openapitools/client/model/CreateFeeAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.client.model.Schedule1; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -47,10 +48,10 @@ import org.openapitools.client.JSON; /** - * CreateFeeAttributes + * CreateRecurringCreditAchPaymentAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateFeeAttributes { +public class CreateRecurringCreditAchPaymentAttributes { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) private Integer amount; @@ -59,18 +60,26 @@ public class CreateFeeAttributes { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; + public static final String SERIALIZED_NAME_ADDENDA = "addenda"; + @SerializedName(SERIALIZED_NAME_ADDENDA) + private String addenda; public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) private String idempotencyKey; - public CreateFeeAttributes() { + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + private Object tags; + + public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; + @SerializedName(SERIALIZED_NAME_SCHEDULE) + private Schedule1 schedule; + + public CreateRecurringCreditAchPaymentAttributes() { } - public CreateFeeAttributes amount(Integer amount) { + public CreateRecurringCreditAchPaymentAttributes amount(Integer amount) { this.amount = amount; return this; @@ -92,7 +101,7 @@ public void setAmount(Integer amount) { } - public CreateFeeAttributes description(String description) { + public CreateRecurringCreditAchPaymentAttributes description(String description) { this.description = description; return this; @@ -113,28 +122,28 @@ public void setDescription(String description) { } - public CreateFeeAttributes tags(Object tags) { + public CreateRecurringCreditAchPaymentAttributes addenda(String addenda) { - this.tags = tags; + this.addenda = addenda; return this; } /** - * Get tags - * @return tags + * Get addenda + * @return addenda **/ @javax.annotation.Nullable - public Object getTags() { - return tags; + public String getAddenda() { + return addenda; } - public void setTags(Object tags) { - this.tags = tags; + public void setAddenda(String addenda) { + this.addenda = addenda; } - public CreateFeeAttributes idempotencyKey(String idempotencyKey) { + public CreateRecurringCreditAchPaymentAttributes idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; @@ -155,6 +164,48 @@ public void setIdempotencyKey(String idempotencyKey) { } + public CreateRecurringCreditAchPaymentAttributes tags(Object tags) { + + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + public Object getTags() { + return tags; + } + + + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateRecurringCreditAchPaymentAttributes schedule(Schedule1 schedule) { + + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @javax.annotation.Nonnull + public Schedule1 getSchedule() { + return schedule; + } + + + public void setSchedule(Schedule1 schedule) { + this.schedule = schedule; + } + + @Override public boolean equals(Object o) { @@ -164,26 +215,30 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateFeeAttributes createFeeAttributes = (CreateFeeAttributes) o; - return Objects.equals(this.amount, createFeeAttributes.amount) && - Objects.equals(this.description, createFeeAttributes.description) && - Objects.equals(this.tags, createFeeAttributes.tags) && - Objects.equals(this.idempotencyKey, createFeeAttributes.idempotencyKey); + CreateRecurringCreditAchPaymentAttributes createRecurringCreditAchPaymentAttributes = (CreateRecurringCreditAchPaymentAttributes) o; + return Objects.equals(this.amount, createRecurringCreditAchPaymentAttributes.amount) && + Objects.equals(this.description, createRecurringCreditAchPaymentAttributes.description) && + Objects.equals(this.addenda, createRecurringCreditAchPaymentAttributes.addenda) && + Objects.equals(this.idempotencyKey, createRecurringCreditAchPaymentAttributes.idempotencyKey) && + Objects.equals(this.tags, createRecurringCreditAchPaymentAttributes.tags) && + Objects.equals(this.schedule, createRecurringCreditAchPaymentAttributes.schedule); } @Override public int hashCode() { - return Objects.hash(amount, description, tags, idempotencyKey); + return Objects.hash(amount, description, addenda, idempotencyKey, tags, schedule); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateFeeAttributes {\n"); + sb.append("class CreateRecurringCreditAchPaymentAttributes {\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); sb.append("}"); return sb.toString(); } @@ -208,38 +263,41 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("amount"); openapiFields.add("description"); - openapiFields.add("tags"); + openapiFields.add("addenda"); openapiFields.add("idempotencyKey"); + openapiFields.add("tags"); + openapiFields.add("schedule"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("amount"); openapiRequiredFields.add("description"); + openapiRequiredFields.add("schedule"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateFeeAttributes + * @throws IOException if the JSON Element is invalid with respect to CreateRecurringCreditAchPaymentAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateFeeAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateFeeAttributes is not found in the empty JSON string", CreateFeeAttributes.openapiRequiredFields.toString())); + if (!CreateRecurringCreditAchPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringCreditAchPaymentAttributes is not found in the empty JSON string", CreateRecurringCreditAchPaymentAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateFeeAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateFeeAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateRecurringCreditAchPaymentAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringCreditAchPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateFeeAttributes.openapiRequiredFields) { + for (String requiredField : CreateRecurringCreditAchPaymentAttributes.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -248,31 +306,36 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } + if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); + } if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); } + // validate the required field `schedule` + Schedule1.validateJsonElement(jsonObj.get("schedule")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateFeeAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateFeeAttributes' and its subtypes + if (!CreateRecurringCreditAchPaymentAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRecurringCreditAchPaymentAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateFeeAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditAchPaymentAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateFeeAttributes value) throws IOException { + public void write(JsonWriter out, CreateRecurringCreditAchPaymentAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateFeeAttributes read(JsonReader in) throws IOException { + public CreateRecurringCreditAchPaymentAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -283,18 +346,18 @@ public CreateFeeAttributes read(JsonReader in) throws IOException { } /** - * Create an instance of CreateFeeAttributes given an JSON string + * Create an instance of CreateRecurringCreditAchPaymentAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of CreateFeeAttributes - * @throws IOException if the JSON string is invalid with respect to CreateFeeAttributes + * @return An instance of CreateRecurringCreditAchPaymentAttributes + * @throws IOException if the JSON string is invalid with respect to CreateRecurringCreditAchPaymentAttributes */ - public static CreateFeeAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateFeeAttributes.class); + public static CreateRecurringCreditAchPaymentAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRecurringCreditAchPaymentAttributes.class); } /** - * Convert an instance of CreateFeeAttributes to an JSON string + * Convert an instance of CreateRecurringCreditAchPaymentAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPayment.java b/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPayment.java new file mode 100644 index 00000000..eb7680ee --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPayment.java @@ -0,0 +1,280 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateBookPaymentRelationships; +import org.openapitools.client.model.CreateRecurringCreditBookPaymentAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * CreateRecurringCreditBookPayment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringCreditBookPayment { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "recurringCreditBookPayment"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateRecurringCreditBookPaymentAttributes attributes; + + public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; + @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) + private CreateBookPaymentRelationships relationships; + + public CreateRecurringCreditBookPayment() { + } + + public CreateRecurringCreditBookPayment type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public CreateRecurringCreditBookPayment attributes(CreateRecurringCreditBookPaymentAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nonnull + public CreateRecurringCreditBookPaymentAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(CreateRecurringCreditBookPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateRecurringCreditBookPayment relationships(CreateBookPaymentRelationships relationships) { + + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @javax.annotation.Nonnull + public CreateBookPaymentRelationships getRelationships() { + return relationships; + } + + + public void setRelationships(CreateBookPaymentRelationships relationships) { + this.relationships = relationships; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringCreditBookPayment createRecurringCreditBookPayment = (CreateRecurringCreditBookPayment) o; + return Objects.equals(this.type, createRecurringCreditBookPayment.type) && + Objects.equals(this.attributes, createRecurringCreditBookPayment.attributes) && + Objects.equals(this.relationships, createRecurringCreditBookPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringCreditBookPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + openapiFields.add("relationships"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); + openapiRequiredFields.add("relationships"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRecurringCreditBookPayment + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRecurringCreditBookPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringCreditBookPayment is not found in the empty JSON string", CreateRecurringCreditBookPayment.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateRecurringCreditBookPayment.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringCreditBookPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRecurringCreditBookPayment.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `attributes` + CreateRecurringCreditBookPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); + // validate the required field `relationships` + CreateBookPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRecurringCreditBookPayment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRecurringCreditBookPayment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditBookPayment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRecurringCreditBookPayment value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRecurringCreditBookPayment read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRecurringCreditBookPayment given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRecurringCreditBookPayment + * @throws IOException if the JSON string is invalid with respect to CreateRecurringCreditBookPayment + */ + public static CreateRecurringCreditBookPayment fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRecurringCreditBookPayment.class); + } + + /** + * Convert an instance of CreateRecurringCreditBookPayment to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPaymentAttributes.java new file mode 100644 index 00000000..9df4f965 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPaymentAttributes.java @@ -0,0 +1,368 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.Schedule1; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * CreateRecurringCreditBookPaymentAttributes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringCreditBookPaymentAttributes { + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + @SerializedName(SERIALIZED_NAME_AMOUNT) + private Integer amount; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; + @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) + private String idempotencyKey; + + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + private Object tags; + + public static final String SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE = "transactionSummaryOverride"; + @SerializedName(SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE) + private String transactionSummaryOverride; + + public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; + @SerializedName(SERIALIZED_NAME_SCHEDULE) + private Schedule1 schedule; + + public CreateRecurringCreditBookPaymentAttributes() { + } + + public CreateRecurringCreditBookPaymentAttributes amount(Integer amount) { + + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @javax.annotation.Nonnull + public Integer getAmount() { + return amount; + } + + + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateRecurringCreditBookPaymentAttributes description(String description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public CreateRecurringCreditBookPaymentAttributes idempotencyKey(String idempotencyKey) { + + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @javax.annotation.Nullable + public String getIdempotencyKey() { + return idempotencyKey; + } + + + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateRecurringCreditBookPaymentAttributes tags(Object tags) { + + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + public Object getTags() { + return tags; + } + + + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateRecurringCreditBookPaymentAttributes transactionSummaryOverride(String transactionSummaryOverride) { + + this.transactionSummaryOverride = transactionSummaryOverride; + return this; + } + + /** + * Get transactionSummaryOverride + * @return transactionSummaryOverride + **/ + @javax.annotation.Nullable + public String getTransactionSummaryOverride() { + return transactionSummaryOverride; + } + + + public void setTransactionSummaryOverride(String transactionSummaryOverride) { + this.transactionSummaryOverride = transactionSummaryOverride; + } + + + public CreateRecurringCreditBookPaymentAttributes schedule(Schedule1 schedule) { + + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @javax.annotation.Nonnull + public Schedule1 getSchedule() { + return schedule; + } + + + public void setSchedule(Schedule1 schedule) { + this.schedule = schedule; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringCreditBookPaymentAttributes createRecurringCreditBookPaymentAttributes = (CreateRecurringCreditBookPaymentAttributes) o; + return Objects.equals(this.amount, createRecurringCreditBookPaymentAttributes.amount) && + Objects.equals(this.description, createRecurringCreditBookPaymentAttributes.description) && + Objects.equals(this.idempotencyKey, createRecurringCreditBookPaymentAttributes.idempotencyKey) && + Objects.equals(this.tags, createRecurringCreditBookPaymentAttributes.tags) && + Objects.equals(this.transactionSummaryOverride, createRecurringCreditBookPaymentAttributes.transactionSummaryOverride) && + Objects.equals(this.schedule, createRecurringCreditBookPaymentAttributes.schedule); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, idempotencyKey, tags, transactionSummaryOverride, schedule); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringCreditBookPaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" transactionSummaryOverride: ").append(toIndentedString(transactionSummaryOverride)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("amount"); + openapiFields.add("description"); + openapiFields.add("idempotencyKey"); + openapiFields.add("tags"); + openapiFields.add("transactionSummaryOverride"); + openapiFields.add("schedule"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("amount"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("schedule"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRecurringCreditBookPaymentAttributes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRecurringCreditBookPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringCreditBookPaymentAttributes is not found in the empty JSON string", CreateRecurringCreditBookPaymentAttributes.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateRecurringCreditBookPaymentAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringCreditBookPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRecurringCreditBookPaymentAttributes.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); + } + if ((jsonObj.get("transactionSummaryOverride") != null && !jsonObj.get("transactionSummaryOverride").isJsonNull()) && !jsonObj.get("transactionSummaryOverride").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `transactionSummaryOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transactionSummaryOverride").toString())); + } + // validate the required field `schedule` + Schedule1.validateJsonElement(jsonObj.get("schedule")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRecurringCreditBookPaymentAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRecurringCreditBookPaymentAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditBookPaymentAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRecurringCreditBookPaymentAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRecurringCreditBookPaymentAttributes read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRecurringCreditBookPaymentAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRecurringCreditBookPaymentAttributes + * @throws IOException if the JSON string is invalid with respect to CreateRecurringCreditBookPaymentAttributes + */ + public static CreateRecurringCreditBookPaymentAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRecurringCreditBookPaymentAttributes.class); + } + + /** + * Convert an instance of CreateRecurringCreditBookPaymentAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPayment.java b/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPayment.java new file mode 100644 index 00000000..e615bc27 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPayment.java @@ -0,0 +1,280 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateAchPaymentCounterpartyRelationships; +import org.openapitools.client.model.CreateRecurringDebitAchPaymentAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * CreateRecurringDebitAchPayment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringDebitAchPayment { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "recurringDebitAchPayment"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateRecurringDebitAchPaymentAttributes attributes; + + public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; + @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) + private CreateAchPaymentCounterpartyRelationships relationships; + + public CreateRecurringDebitAchPayment() { + } + + public CreateRecurringDebitAchPayment type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public CreateRecurringDebitAchPayment attributes(CreateRecurringDebitAchPaymentAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nonnull + public CreateRecurringDebitAchPaymentAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(CreateRecurringDebitAchPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateRecurringDebitAchPayment relationships(CreateAchPaymentCounterpartyRelationships relationships) { + + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @javax.annotation.Nonnull + public CreateAchPaymentCounterpartyRelationships getRelationships() { + return relationships; + } + + + public void setRelationships(CreateAchPaymentCounterpartyRelationships relationships) { + this.relationships = relationships; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringDebitAchPayment createRecurringDebitAchPayment = (CreateRecurringDebitAchPayment) o; + return Objects.equals(this.type, createRecurringDebitAchPayment.type) && + Objects.equals(this.attributes, createRecurringDebitAchPayment.attributes) && + Objects.equals(this.relationships, createRecurringDebitAchPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringDebitAchPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + openapiFields.add("relationships"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); + openapiRequiredFields.add("relationships"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRecurringDebitAchPayment + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRecurringDebitAchPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringDebitAchPayment is not found in the empty JSON string", CreateRecurringDebitAchPayment.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateRecurringDebitAchPayment.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringDebitAchPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRecurringDebitAchPayment.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `attributes` + CreateRecurringDebitAchPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); + // validate the required field `relationships` + CreateAchPaymentCounterpartyRelationships.validateJsonElement(jsonObj.get("relationships")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRecurringDebitAchPayment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRecurringDebitAchPayment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringDebitAchPayment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRecurringDebitAchPayment value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRecurringDebitAchPayment read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRecurringDebitAchPayment given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRecurringDebitAchPayment + * @throws IOException if the JSON string is invalid with respect to CreateRecurringDebitAchPayment + */ + public static CreateRecurringDebitAchPayment fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRecurringDebitAchPayment.class); + } + + /** + * Convert an instance of CreateRecurringDebitAchPayment to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPaymentAttributes.java new file mode 100644 index 00000000..33465b39 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPaymentAttributes.java @@ -0,0 +1,453 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.Schedule1; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * CreateRecurringDebitAchPaymentAttributes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringDebitAchPaymentAttributes { + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + @SerializedName(SERIALIZED_NAME_AMOUNT) + private Integer amount; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_ADDENDA = "addenda"; + @SerializedName(SERIALIZED_NAME_ADDENDA) + private String addenda; + + public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; + @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) + private String idempotencyKey; + + public static final String SERIALIZED_NAME_SAME_DAY = "sameDay"; + @SerializedName(SERIALIZED_NAME_SAME_DAY) + private Boolean sameDay = false; + + public static final String SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE = "verifyCounterpartyBalance"; + @SerializedName(SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE) + private Boolean verifyCounterpartyBalance = false; + + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + private Object tags; + + public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; + @SerializedName(SERIALIZED_NAME_SCHEDULE) + private Schedule1 schedule; + + public static final String SERIALIZED_NAME_CLEARING_DAYS_OVERRIDE = "clearingDaysOverride"; + @SerializedName(SERIALIZED_NAME_CLEARING_DAYS_OVERRIDE) + private Integer clearingDaysOverride; + + public CreateRecurringDebitAchPaymentAttributes() { + } + + public CreateRecurringDebitAchPaymentAttributes amount(Integer amount) { + + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @javax.annotation.Nonnull + public Integer getAmount() { + return amount; + } + + + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateRecurringDebitAchPaymentAttributes description(String description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public CreateRecurringDebitAchPaymentAttributes addenda(String addenda) { + + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @javax.annotation.Nullable + public String getAddenda() { + return addenda; + } + + + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public CreateRecurringDebitAchPaymentAttributes idempotencyKey(String idempotencyKey) { + + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @javax.annotation.Nullable + public String getIdempotencyKey() { + return idempotencyKey; + } + + + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateRecurringDebitAchPaymentAttributes sameDay(Boolean sameDay) { + + this.sameDay = sameDay; + return this; + } + + /** + * Get sameDay + * @return sameDay + **/ + @javax.annotation.Nullable + public Boolean getSameDay() { + return sameDay; + } + + + public void setSameDay(Boolean sameDay) { + this.sameDay = sameDay; + } + + + public CreateRecurringDebitAchPaymentAttributes verifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + return this; + } + + /** + * Get verifyCounterpartyBalance + * @return verifyCounterpartyBalance + **/ + @javax.annotation.Nullable + public Boolean getVerifyCounterpartyBalance() { + return verifyCounterpartyBalance; + } + + + public void setVerifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + } + + + public CreateRecurringDebitAchPaymentAttributes tags(Object tags) { + + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + public Object getTags() { + return tags; + } + + + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateRecurringDebitAchPaymentAttributes schedule(Schedule1 schedule) { + + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @javax.annotation.Nonnull + public Schedule1 getSchedule() { + return schedule; + } + + + public void setSchedule(Schedule1 schedule) { + this.schedule = schedule; + } + + + public CreateRecurringDebitAchPaymentAttributes clearingDaysOverride(Integer clearingDaysOverride) { + + this.clearingDaysOverride = clearingDaysOverride; + return this; + } + + /** + * Get clearingDaysOverride + * minimum: 0 + * @return clearingDaysOverride + **/ + @javax.annotation.Nullable + public Integer getClearingDaysOverride() { + return clearingDaysOverride; + } + + + public void setClearingDaysOverride(Integer clearingDaysOverride) { + this.clearingDaysOverride = clearingDaysOverride; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringDebitAchPaymentAttributes createRecurringDebitAchPaymentAttributes = (CreateRecurringDebitAchPaymentAttributes) o; + return Objects.equals(this.amount, createRecurringDebitAchPaymentAttributes.amount) && + Objects.equals(this.description, createRecurringDebitAchPaymentAttributes.description) && + Objects.equals(this.addenda, createRecurringDebitAchPaymentAttributes.addenda) && + Objects.equals(this.idempotencyKey, createRecurringDebitAchPaymentAttributes.idempotencyKey) && + Objects.equals(this.sameDay, createRecurringDebitAchPaymentAttributes.sameDay) && + Objects.equals(this.verifyCounterpartyBalance, createRecurringDebitAchPaymentAttributes.verifyCounterpartyBalance) && + Objects.equals(this.tags, createRecurringDebitAchPaymentAttributes.tags) && + Objects.equals(this.schedule, createRecurringDebitAchPaymentAttributes.schedule) && + Objects.equals(this.clearingDaysOverride, createRecurringDebitAchPaymentAttributes.clearingDaysOverride); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, addenda, idempotencyKey, sameDay, verifyCounterpartyBalance, tags, schedule, clearingDaysOverride); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringDebitAchPaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); + sb.append(" verifyCounterpartyBalance: ").append(toIndentedString(verifyCounterpartyBalance)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append(" clearingDaysOverride: ").append(toIndentedString(clearingDaysOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("amount"); + openapiFields.add("description"); + openapiFields.add("addenda"); + openapiFields.add("idempotencyKey"); + openapiFields.add("sameDay"); + openapiFields.add("verifyCounterpartyBalance"); + openapiFields.add("tags"); + openapiFields.add("schedule"); + openapiFields.add("clearingDaysOverride"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("amount"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("schedule"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRecurringDebitAchPaymentAttributes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRecurringDebitAchPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringDebitAchPaymentAttributes is not found in the empty JSON string", CreateRecurringDebitAchPaymentAttributes.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateRecurringDebitAchPaymentAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringDebitAchPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRecurringDebitAchPaymentAttributes.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); + } + if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); + } + // validate the required field `schedule` + Schedule1.validateJsonElement(jsonObj.get("schedule")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRecurringDebitAchPaymentAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRecurringDebitAchPaymentAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringDebitAchPaymentAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRecurringDebitAchPaymentAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRecurringDebitAchPaymentAttributes read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRecurringDebitAchPaymentAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRecurringDebitAchPaymentAttributes + * @throws IOException if the JSON string is invalid with respect to CreateRecurringDebitAchPaymentAttributes + */ + public static CreateRecurringDebitAchPaymentAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRecurringDebitAchPaymentAttributes.class); + } + + /** + * Convert an instance of CreateRecurringDebitAchPaymentAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringPayment.java b/src/main/java/org/openapitools/client/model/CreateRecurringPayment.java index 6e37b4f9..2616329b 100644 --- a/src/main/java/org/openapitools/client/model/CreateRecurringPayment.java +++ b/src/main/java/org/openapitools/client/model/CreateRecurringPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.client.model.CreateRecurringPaymentData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -51,31 +52,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateRecurringPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateRecurringPaymentData data; public CreateRecurringPayment() { } - public CreateRecurringPayment type(String type) { + public CreateRecurringPayment data(CreateRecurringPaymentData data) { - this.type = type; + this.data = data; return this; } /** - * Get type - * @return type + * Get data + * @return data **/ - @javax.annotation.Nullable - public String getType() { - return type; + @javax.annotation.Nonnull + public CreateRecurringPaymentData getData() { + return data; } - public void setType(String type) { - this.type = type; + public void setData(CreateRecurringPaymentData data) { + this.data = data; } @@ -89,19 +90,19 @@ public boolean equals(Object o) { return false; } CreateRecurringPayment createRecurringPayment = (CreateRecurringPayment) o; - return Objects.equals(this.type, createRecurringPayment.type); + return Objects.equals(this.data, createRecurringPayment.data); } @Override public int hashCode() { - return Objects.hash(type); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateRecurringPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -124,10 +125,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); } /** @@ -150,10 +152,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRecurringPayment.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `data` + CreateRecurringPaymentData.validateJsonElement(jsonObj.get("data")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringPaymentData.java b/src/main/java/org/openapitools/client/model/CreateRecurringPaymentData.java new file mode 100644 index 00000000..ac6adbb7 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateRecurringPaymentData.java @@ -0,0 +1,329 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateBookPaymentRelationships; +import org.openapitools.client.model.CreateRecurringCreditAchPayment; +import org.openapitools.client.model.CreateRecurringCreditBookPayment; +import org.openapitools.client.model.CreateRecurringCreditBookPaymentAttributes; +import org.openapitools.client.model.CreateRecurringDebitAchPayment; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import org.openapitools.client.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringPaymentData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateRecurringPaymentData.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRecurringPaymentData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRecurringPaymentData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterCreateRecurringCreditAchPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditAchPayment.class)); + final TypeAdapter adapterCreateRecurringDebitAchPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringDebitAchPayment.class)); + final TypeAdapter adapterCreateRecurringCreditBookPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditBookPayment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRecurringPaymentData value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `CreateRecurringCreditAchPayment` + if (value.getActualInstance() instanceof CreateRecurringCreditAchPayment) { + JsonElement element = adapterCreateRecurringCreditAchPayment.toJsonTree((CreateRecurringCreditAchPayment)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateRecurringDebitAchPayment` + if (value.getActualInstance() instanceof CreateRecurringDebitAchPayment) { + JsonElement element = adapterCreateRecurringDebitAchPayment.toJsonTree((CreateRecurringDebitAchPayment)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CreateRecurringCreditBookPayment` + if (value.getActualInstance() instanceof CreateRecurringCreditBookPayment) { + JsonElement element = adapterCreateRecurringCreditBookPayment.toJsonTree((CreateRecurringCreditBookPayment)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment"); + } + + @Override + public CreateRecurringPaymentData read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize CreateRecurringCreditAchPayment + try { + // validate the JSON object to see if any exception is thrown + CreateRecurringCreditAchPayment.validateJsonElement(jsonElement); + actualAdapter = adapterCreateRecurringCreditAchPayment; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateRecurringCreditAchPayment'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateRecurringCreditAchPayment failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateRecurringCreditAchPayment'", e); + } + // deserialize CreateRecurringDebitAchPayment + try { + // validate the JSON object to see if any exception is thrown + CreateRecurringDebitAchPayment.validateJsonElement(jsonElement); + actualAdapter = adapterCreateRecurringDebitAchPayment; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateRecurringDebitAchPayment'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateRecurringDebitAchPayment failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateRecurringDebitAchPayment'", e); + } + // deserialize CreateRecurringCreditBookPayment + try { + // validate the JSON object to see if any exception is thrown + CreateRecurringCreditBookPayment.validateJsonElement(jsonElement); + actualAdapter = adapterCreateRecurringCreditBookPayment; + match++; + log.log(Level.FINER, "Input data matches schema 'CreateRecurringCreditBookPayment'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for CreateRecurringCreditBookPayment failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CreateRecurringCreditBookPayment'", e); + } + + if (match == 1) { + CreateRecurringPaymentData ret = new CreateRecurringPaymentData(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for CreateRecurringPaymentData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public CreateRecurringPaymentData() { + super("oneOf", Boolean.FALSE); + } + + public CreateRecurringPaymentData(CreateRecurringCreditAchPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateRecurringPaymentData(CreateRecurringCreditBookPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateRecurringPaymentData(CreateRecurringDebitAchPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateRecurringCreditAchPayment", CreateRecurringCreditAchPayment.class); + schemas.put("CreateRecurringDebitAchPayment", CreateRecurringDebitAchPayment.class); + schemas.put("CreateRecurringCreditBookPayment", CreateRecurringCreditBookPayment.class); + } + + @Override + public Map> getSchemas() { + return CreateRecurringPaymentData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof CreateRecurringCreditAchPayment) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateRecurringDebitAchPayment) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CreateRecurringCreditBookPayment) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment"); + } + + /** + * Get the actual instance, which can be the following: + * CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment + * + * @return The actual instance (CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateRecurringCreditAchPayment`. If the actual instance is not `CreateRecurringCreditAchPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateRecurringCreditAchPayment` + * @throws ClassCastException if the instance is not `CreateRecurringCreditAchPayment` + */ + public CreateRecurringCreditAchPayment getCreateRecurringCreditAchPayment() throws ClassCastException { + return (CreateRecurringCreditAchPayment)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateRecurringDebitAchPayment`. If the actual instance is not `CreateRecurringDebitAchPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateRecurringDebitAchPayment` + * @throws ClassCastException if the instance is not `CreateRecurringDebitAchPayment` + */ + public CreateRecurringDebitAchPayment getCreateRecurringDebitAchPayment() throws ClassCastException { + return (CreateRecurringDebitAchPayment)super.getActualInstance(); + } + /** + * Get the actual instance of `CreateRecurringCreditBookPayment`. If the actual instance is not `CreateRecurringCreditBookPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateRecurringCreditBookPayment` + * @throws ClassCastException if the instance is not `CreateRecurringCreditBookPayment` + */ + public CreateRecurringCreditBookPayment getCreateRecurringCreditBookPayment() throws ClassCastException { + return (CreateRecurringCreditBookPayment)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRecurringPaymentData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with CreateRecurringCreditAchPayment + try { + CreateRecurringCreditAchPayment.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateRecurringCreditAchPayment failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateRecurringDebitAchPayment + try { + CreateRecurringDebitAchPayment.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateRecurringDebitAchPayment failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with CreateRecurringCreditBookPayment + try { + CreateRecurringCreditBookPayment.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for CreateRecurringCreditBookPayment failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for CreateRecurringPaymentData with oneOf schemas: CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of CreateRecurringPaymentData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRecurringPaymentData + * @throws IOException if the JSON string is invalid with respect to CreateRecurringPaymentData + */ + public static CreateRecurringPaymentData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRecurringPaymentData.class); + } + + /** + * Convert an instance of CreateRecurringPaymentData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateRepayment.java b/src/main/java/org/openapitools/client/model/CreateRepayment.java index 14607fbe..c1f353bd 100644 --- a/src/main/java/org/openapitools/client/model/CreateRepayment.java +++ b/src/main/java/org/openapitools/client/model/CreateRepayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateRepaymentData.java b/src/main/java/org/openapitools/client/model/CreateRepaymentData.java index 7f0db677..42d4c382 100644 --- a/src/main/java/org/openapitools/client/model/CreateRepaymentData.java +++ b/src/main/java/org/openapitools/client/model/CreateRepaymentData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateReward.java b/src/main/java/org/openapitools/client/model/CreateReward.java index 4fbd116c..7becfa74 100644 --- a/src/main/java/org/openapitools/client/model/CreateReward.java +++ b/src/main/java/org/openapitools/client/model/CreateReward.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,8 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateRewardAttributes; -import org.openapitools.client.model.CreateRewardRelationships; +import org.openapitools.client.model.CreateRewardData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,81 +52,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateReward { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "reward"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateRewardAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateRewardRelationships relationships; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateRewardData data; public CreateReward() { } - public CreateReward type(String type) { + public CreateReward data(CreateRewardData data) { - this.type = type; + this.data = data; return this; } /** - * Get type - * @return type + * Get data + * @return data **/ - @javax.annotation.Nonnull - public String getType() { - return type; + @javax.annotation.Nullable + public CreateRewardData getData() { + return data; } - public void setType(String type) { - this.type = type; - } - - - public CreateReward attributes(CreateRewardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateRewardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateRewardAttributes attributes) { - this.attributes = attributes; - } - - - public CreateReward relationships(CreateRewardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateRewardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateRewardRelationships relationships) { - this.relationships = relationships; + public void setData(CreateRewardData data) { + this.data = data; } @@ -141,23 +90,19 @@ public boolean equals(Object o) { return false; } CreateReward createReward = (CreateReward) o; - return Objects.equals(this.type, createReward.type) && - Objects.equals(this.attributes, createReward.attributes) && - Objects.equals(this.relationships, createReward.relationships); + return Objects.equals(this.data, createReward.data); } @Override public int hashCode() { - return Objects.hash(type, attributes, relationships); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateReward {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -180,15 +125,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); } /** @@ -211,21 +151,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateReward` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateReward.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateRewardData.validateJsonElement(jsonObj.get("data")); } - // validate the required field `attributes` - CreateRewardAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateRewardRelationships.validateJsonElement(jsonObj.get("relationships")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/CreateRewardData.java b/src/main/java/org/openapitools/client/model/CreateRewardData.java new file mode 100644 index 00000000..fa3388a6 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/CreateRewardData.java @@ -0,0 +1,280 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.CreateRewardDataAttributes; +import org.openapitools.client.model.CreateRewardRelationships; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * CreateRewardData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRewardData { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "reward"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateRewardDataAttributes attributes; + + public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; + @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) + private CreateRewardRelationships relationships; + + public CreateRewardData() { + } + + public CreateRewardData type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public CreateRewardData attributes(CreateRewardDataAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nonnull + public CreateRewardDataAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(CreateRewardDataAttributes attributes) { + this.attributes = attributes; + } + + + public CreateRewardData relationships(CreateRewardRelationships relationships) { + + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @javax.annotation.Nonnull + public CreateRewardRelationships getRelationships() { + return relationships; + } + + + public void setRelationships(CreateRewardRelationships relationships) { + this.relationships = relationships; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRewardData createRewardData = (CreateRewardData) o; + return Objects.equals(this.type, createRewardData.type) && + Objects.equals(this.attributes, createRewardData.attributes) && + Objects.equals(this.relationships, createRewardData.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRewardData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + openapiFields.add("relationships"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); + openapiRequiredFields.add("relationships"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRewardData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRewardData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRewardData is not found in the empty JSON string", CreateRewardData.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateRewardData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRewardData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRewardData.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `attributes` + CreateRewardDataAttributes.validateJsonElement(jsonObj.get("attributes")); + // validate the required field `relationships` + CreateRewardRelationships.validateJsonElement(jsonObj.get("relationships")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRewardData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRewardData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRewardData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRewardData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRewardData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRewardData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRewardData + * @throws IOException if the JSON string is invalid with respect to CreateRewardData + */ + public static CreateRewardData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRewardData.class); + } + + /** + * Convert an instance of CreateRewardData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/CreateRewardAttributes.java b/src/main/java/org/openapitools/client/model/CreateRewardDataAttributes.java similarity index 76% rename from src/main/java/org/openapitools/client/model/CreateRewardAttributes.java rename to src/main/java/org/openapitools/client/model/CreateRewardDataAttributes.java index b4bd68a3..f1775c56 100644 --- a/src/main/java/org/openapitools/client/model/CreateRewardAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateRewardDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,10 +47,10 @@ import org.openapitools.client.JSON; /** - * CreateRewardAttributes + * CreateRewardDataAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRewardAttributes { +public class CreateRewardDataAttributes { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) private Integer amount; @@ -67,10 +67,10 @@ public class CreateRewardAttributes { @SerializedName(SERIALIZED_NAME_TAGS) private Object tags; - public CreateRewardAttributes() { + public CreateRewardDataAttributes() { } - public CreateRewardAttributes amount(Integer amount) { + public CreateRewardDataAttributes amount(Integer amount) { this.amount = amount; return this; @@ -92,7 +92,7 @@ public void setAmount(Integer amount) { } - public CreateRewardAttributes description(String description) { + public CreateRewardDataAttributes description(String description) { this.description = description; return this; @@ -113,7 +113,7 @@ public void setDescription(String description) { } - public CreateRewardAttributes idempotencyKey(String idempotencyKey) { + public CreateRewardDataAttributes idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; @@ -134,7 +134,7 @@ public void setIdempotencyKey(String idempotencyKey) { } - public CreateRewardAttributes tags(Object tags) { + public CreateRewardDataAttributes tags(Object tags) { this.tags = tags; return this; @@ -164,11 +164,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateRewardAttributes createRewardAttributes = (CreateRewardAttributes) o; - return Objects.equals(this.amount, createRewardAttributes.amount) && - Objects.equals(this.description, createRewardAttributes.description) && - Objects.equals(this.idempotencyKey, createRewardAttributes.idempotencyKey) && - Objects.equals(this.tags, createRewardAttributes.tags); + CreateRewardDataAttributes createRewardDataAttributes = (CreateRewardDataAttributes) o; + return Objects.equals(this.amount, createRewardDataAttributes.amount) && + Objects.equals(this.description, createRewardDataAttributes.description) && + Objects.equals(this.idempotencyKey, createRewardDataAttributes.idempotencyKey) && + Objects.equals(this.tags, createRewardDataAttributes.tags); } @Override @@ -179,7 +179,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateRewardAttributes {\n"); + sb.append("class CreateRewardDataAttributes {\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); @@ -221,25 +221,25 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRewardAttributes + * @throws IOException if the JSON Element is invalid with respect to CreateRewardDataAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateRewardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRewardAttributes is not found in the empty JSON string", CreateRewardAttributes.openapiRequiredFields.toString())); + if (!CreateRewardDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRewardDataAttributes is not found in the empty JSON string", CreateRewardDataAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateRewardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRewardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CreateRewardDataAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRewardDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRewardAttributes.openapiRequiredFields) { + for (String requiredField : CreateRewardDataAttributes.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -257,22 +257,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRewardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRewardAttributes' and its subtypes + if (!CreateRewardDataAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRewardDataAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRewardAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRewardDataAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateRewardAttributes value) throws IOException { + public void write(JsonWriter out, CreateRewardDataAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateRewardAttributes read(JsonReader in) throws IOException { + public CreateRewardDataAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -283,18 +283,18 @@ public CreateRewardAttributes read(JsonReader in) throws IOException { } /** - * Create an instance of CreateRewardAttributes given an JSON string + * Create an instance of CreateRewardDataAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of CreateRewardAttributes - * @throws IOException if the JSON string is invalid with respect to CreateRewardAttributes + * @return An instance of CreateRewardDataAttributes + * @throws IOException if the JSON string is invalid with respect to CreateRewardDataAttributes */ - public static CreateRewardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRewardAttributes.class); + public static CreateRewardDataAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRewardDataAttributes.class); } /** - * Convert an instance of CreateRewardAttributes to an JSON string + * Convert an instance of CreateRewardDataAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/CreateRewardRelationships.java b/src/main/java/org/openapitools/client/model/CreateRewardRelationships.java index fee51562..03f6f550 100644 --- a/src/main/java/org/openapitools/client/model/CreateRewardRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreateRewardRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplication.java b/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplication.java index 87551c19..6d102c42 100644 --- a/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplication.java +++ b/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplicationAttributes.java b/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplicationAttributes.java index 97c3b450..6294f25e 100644 --- a/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplicationAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplicationAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateStopPayment.java b/src/main/java/org/openapitools/client/model/CreateStopPayment.java index c67597dd..7fa92fc8 100644 --- a/src/main/java/org/openapitools/client/model/CreateStopPayment.java +++ b/src/main/java/org/openapitools/client/model/CreateStopPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateTrustApplication.java b/src/main/java/org/openapitools/client/model/CreateTrustApplication.java index 6027270c..4f64c4f6 100644 --- a/src/main/java/org/openapitools/client/model/CreateTrustApplication.java +++ b/src/main/java/org/openapitools/client/model/CreateTrustApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateTrustApplicationAttributes.java b/src/main/java/org/openapitools/client/model/CreateTrustApplicationAttributes.java index eb3794bd..8f21b26b 100644 --- a/src/main/java/org/openapitools/client/model/CreateTrustApplicationAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateTrustApplicationAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateWebhook.java b/src/main/java/org/openapitools/client/model/CreateWebhook.java index 97fadd17..ec1edc22 100644 --- a/src/main/java/org/openapitools/client/model/CreateWebhook.java +++ b/src/main/java/org/openapitools/client/model/CreateWebhook.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateWebhookData.java b/src/main/java/org/openapitools/client/model/CreateWebhookData.java index aa7468af..e9c790cb 100644 --- a/src/main/java/org/openapitools/client/model/CreateWebhookData.java +++ b/src/main/java/org/openapitools/client/model/CreateWebhookData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateWebhookDataAttributes.java b/src/main/java/org/openapitools/client/model/CreateWebhookDataAttributes.java index 1b38597f..1ad99277 100644 --- a/src/main/java/org/openapitools/client/model/CreateWebhookDataAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateWebhookDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateWirePayment.java b/src/main/java/org/openapitools/client/model/CreateWirePayment.java index 30480c02..8ad75628 100644 --- a/src/main/java/org/openapitools/client/model/CreateWirePayment.java +++ b/src/main/java/org/openapitools/client/model/CreateWirePayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreateWirePaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateWirePaymentAttributes.java index 3f39b7ba..70455d6c 100644 --- a/src/main/java/org/openapitools/client/model/CreateWirePaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreateWirePaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreditAccount.java b/src/main/java/org/openapitools/client/model/CreditAccount.java index 1bcb2214..ff6cbe50 100644 --- a/src/main/java/org/openapitools/client/model/CreditAccount.java +++ b/src/main/java/org/openapitools/client/model/CreditAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreditAccountAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CreditAccountAllOfAttributes.java index ea7ea008..9327b595 100644 --- a/src/main/java/org/openapitools/client/model/CreditAccountAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreditAccountAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreditAccountRelationships.java b/src/main/java/org/openapitools/client/model/CreditAccountRelationships.java index 3eb9ada0..8aa73fac 100644 --- a/src/main/java/org/openapitools/client/model/CreditAccountRelationships.java +++ b/src/main/java/org/openapitools/client/model/CreditAccountRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -79,6 +79,50 @@ public void setCustomer(CustomerLinkage customer) { this.customer = customer; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreditAccountRelationships instance itself + */ + public CreditAccountRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -90,12 +134,13 @@ public boolean equals(Object o) { return false; } CreditAccountRelationships creditAccountRelationships = (CreditAccountRelationships) o; - return Objects.equals(this.customer, creditAccountRelationships.customer); + return Objects.equals(this.customer, creditAccountRelationships.customer)&& + Objects.equals(this.additionalProperties, creditAccountRelationships.additionalProperties); } @Override public int hashCode() { - return Objects.hash(customer); + return Objects.hash(customer, additionalProperties); } @Override @@ -103,6 +148,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreditAccountRelationships {\n"); sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -145,14 +191,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreditAccountRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreditAccountRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreditAccountRelationships.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -179,6 +217,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, CreditAccountRelationships value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -186,7 +241,28 @@ public void write(JsonWriter out, CreditAccountRelationships value) throws IOExc public CreditAccountRelationships read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreditAccountRelationships instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/CreditLimits.java b/src/main/java/org/openapitools/client/model/CreditLimits.java index 6aab76e7..f0f3540e 100644 --- a/src/main/java/org/openapitools/client/model/CreditLimits.java +++ b/src/main/java/org/openapitools/client/model/CreditLimits.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CreditLimitsAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CreditLimitsAllOfAttributes.java index 1eb0ed36..91946b13 100644 --- a/src/main/java/org/openapitools/client/model/CreditLimitsAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/CreditLimitsAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Customer.java b/src/main/java/org/openapitools/client/model/Customer.java index 3d4e1918..bc4f7315 100644 --- a/src/main/java/org/openapitools/client/model/Customer.java +++ b/src/main/java/org/openapitools/client/model/Customer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerLinkage.java b/src/main/java/org/openapitools/client/model/CustomerLinkage.java index bcf5fd1e..0fccbdb1 100644 --- a/src/main/java/org/openapitools/client/model/CustomerLinkage.java +++ b/src/main/java/org/openapitools/client/model/CustomerLinkage.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerLinkageData.java b/src/main/java/org/openapitools/client/model/CustomerLinkageData.java index c6d0d007..8c815cd2 100644 --- a/src/main/java/org/openapitools/client/model/CustomerLinkageData.java +++ b/src/main/java/org/openapitools/client/model/CustomerLinkageData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerRelationship.java b/src/main/java/org/openapitools/client/model/CustomerRelationship.java index 17348479..5a8a1995 100644 --- a/src/main/java/org/openapitools/client/model/CustomerRelationship.java +++ b/src/main/java/org/openapitools/client/model/CustomerRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerRelationships.java b/src/main/java/org/openapitools/client/model/CustomerRelationships.java index 969d1689..3872391e 100644 --- a/src/main/java/org/openapitools/client/model/CustomerRelationships.java +++ b/src/main/java/org/openapitools/client/model/CustomerRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerRepaymentReturnedTransaction.java b/src/main/java/org/openapitools/client/model/CustomerRepaymentReturnedTransaction.java index e586777a..3b67cdbd 100644 --- a/src/main/java/org/openapitools/client/model/CustomerRepaymentReturnedTransaction.java +++ b/src/main/java/org/openapitools/client/model/CustomerRepaymentReturnedTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerRepaymentTransaction.java b/src/main/java/org/openapitools/client/model/CustomerRepaymentTransaction.java index e9a91bd3..fb3586bb 100644 --- a/src/main/java/org/openapitools/client/model/CustomerRepaymentTransaction.java +++ b/src/main/java/org/openapitools/client/model/CustomerRepaymentTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerToken.java b/src/main/java/org/openapitools/client/model/CustomerToken.java index dd29d943..b7066393 100644 --- a/src/main/java/org/openapitools/client/model/CustomerToken.java +++ b/src/main/java/org/openapitools/client/model/CustomerToken.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerTokenAttributes.java b/src/main/java/org/openapitools/client/model/CustomerTokenAttributes.java index 6dbd22b4..a4b73997 100644 --- a/src/main/java/org/openapitools/client/model/CustomerTokenAttributes.java +++ b/src/main/java/org/openapitools/client/model/CustomerTokenAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerTokenVerification.java b/src/main/java/org/openapitools/client/model/CustomerTokenVerification.java index 231494db..1e8ffdc2 100644 --- a/src/main/java/org/openapitools/client/model/CustomerTokenVerification.java +++ b/src/main/java/org/openapitools/client/model/CustomerTokenVerification.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomerTokenVerificationAttributes.java b/src/main/java/org/openapitools/client/model/CustomerTokenVerificationAttributes.java index ffdd3581..49a3bec5 100644 --- a/src/main/java/org/openapitools/client/model/CustomerTokenVerificationAttributes.java +++ b/src/main/java/org/openapitools/client/model/CustomerTokenVerificationAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomersRelationship.java b/src/main/java/org/openapitools/client/model/CustomersRelationship.java index f134bf9a..24b9cbfb 100644 --- a/src/main/java/org/openapitools/client/model/CustomersRelationship.java +++ b/src/main/java/org/openapitools/client/model/CustomersRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/CustomersRelationshipDataInner.java b/src/main/java/org/openapitools/client/model/CustomersRelationshipDataInner.java index d497122b..1e80258a 100644 --- a/src/main/java/org/openapitools/client/model/CustomersRelationshipDataInner.java +++ b/src/main/java/org/openapitools/client/model/CustomersRelationshipDataInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequest.java index c6278b32..90e8448f 100644 --- a/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequest.java +++ b/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.DeclineAuthorizationRequestAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,56 +51,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DeclineAuthorizationRequest { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "declineAuthorizationRequest"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private DeclineAuthorizationRequestAttributes attributes; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private DeclineAuthorizationRequest data; public DeclineAuthorizationRequest() { } - public DeclineAuthorizationRequest type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public DeclineAuthorizationRequest attributes(DeclineAuthorizationRequestAttributes attributes) { + public DeclineAuthorizationRequest data(DeclineAuthorizationRequest data) { - this.attributes = attributes; + this.data = data; return this; } /** - * Get attributes - * @return attributes + * Get data + * @return data **/ - @javax.annotation.Nonnull - public DeclineAuthorizationRequestAttributes getAttributes() { - return attributes; + @javax.annotation.Nullable + public DeclineAuthorizationRequest getData() { + return data; } - public void setAttributes(DeclineAuthorizationRequestAttributes attributes) { - this.attributes = attributes; + public void setData(DeclineAuthorizationRequest data) { + this.data = data; } @@ -115,21 +89,19 @@ public boolean equals(Object o) { return false; } DeclineAuthorizationRequest declineAuthorizationRequest = (DeclineAuthorizationRequest) o; - return Objects.equals(this.type, declineAuthorizationRequest.type) && - Objects.equals(this.attributes, declineAuthorizationRequest.attributes); + return Objects.equals(this.data, declineAuthorizationRequest.data); } @Override public int hashCode() { - return Objects.hash(type, attributes); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeclineAuthorizationRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -152,13 +124,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); } /** @@ -181,19 +150,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeclineAuthorizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeclineAuthorizationRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + DeclineAuthorizationRequest.validateJsonElement(jsonObj.get("data")); } - // validate the required field `attributes` - DeclineAuthorizationRequestAttributes.validateJsonElement(jsonObj.get("attributes")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequestAttributes.java b/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequestAttributes.java index c4a81d22..17b083f7 100644 --- a/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequestAttributes.java +++ b/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequestAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositAccount.java b/src/main/java/org/openapitools/client/model/DepositAccount.java index c50a70c1..146bfb2e 100644 --- a/src/main/java/org/openapitools/client/model/DepositAccount.java +++ b/src/main/java/org/openapitools/client/model/DepositAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributes.java b/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributes.java index 7c342024..046dc8d4 100644 --- a/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java b/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java index 77dbf4a4..4affb22c 100644 --- a/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java +++ b/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositAccountRelationships.java b/src/main/java/org/openapitools/client/model/DepositAccountRelationships.java index 28fb20ba..e94d833a 100644 --- a/src/main/java/org/openapitools/client/model/DepositAccountRelationships.java +++ b/src/main/java/org/openapitools/client/model/DepositAccountRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimits.java b/src/main/java/org/openapitools/client/model/DepositLimits.java index 88b793ea..f701318d 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimits.java +++ b/src/main/java/org/openapitools/client/model/DepositLimits.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributes.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributes.java index cab5e31f..289519af 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAch.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAch.java index fdfcad15..8c802cc0 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAch.java +++ b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAch.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchLimits.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchLimits.java index c8a11b37..2bfbfdea 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchLimits.java +++ b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchLimits.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchTotalsDaily.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchTotalsDaily.java index 06529a08..f972ff5a 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchTotalsDaily.java +++ b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchTotalsDaily.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCard.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCard.java index 2bcd68b4..745f94a1 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCard.java +++ b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardLimits.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardLimits.java index 96352c42..9ea235db 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardLimits.java +++ b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardLimits.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardTotalsDaily.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardTotalsDaily.java index c49a6c75..a5751f5c 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardTotalsDaily.java +++ b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardTotalsDaily.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDeposit.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDeposit.java index f6d516d1..c5328fb2 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDeposit.java +++ b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDeposit.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDepositLimits.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDepositLimits.java index d847d8be..a6796e61 100644 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDepositLimits.java +++ b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDepositLimits.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DeviceFingerprint.java b/src/main/java/org/openapitools/client/model/DeviceFingerprint.java index 6500122d..57ee6be8 100644 --- a/src/main/java/org/openapitools/client/model/DeviceFingerprint.java +++ b/src/main/java/org/openapitools/client/model/DeviceFingerprint.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DishonoredAchTransaction.java b/src/main/java/org/openapitools/client/model/DishonoredAchTransaction.java index 5448f0c1..7ea7954d 100644 --- a/src/main/java/org/openapitools/client/model/DishonoredAchTransaction.java +++ b/src/main/java/org/openapitools/client/model/DishonoredAchTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DishonoredAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/DishonoredAchTransactionAllOfAttributes.java index 1a066a32..8ac55f6d 100644 --- a/src/main/java/org/openapitools/client/model/DishonoredAchTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/DishonoredAchTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Dispute.java b/src/main/java/org/openapitools/client/model/Dispute.java index 94cdd1c6..1d4632b1 100644 --- a/src/main/java/org/openapitools/client/model/Dispute.java +++ b/src/main/java/org/openapitools/client/model/Dispute.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DisputeAttributes.java b/src/main/java/org/openapitools/client/model/DisputeAttributes.java index 240060fa..c0b4a26c 100644 --- a/src/main/java/org/openapitools/client/model/DisputeAttributes.java +++ b/src/main/java/org/openapitools/client/model/DisputeAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DisputeAttributesStatusHistoryInner.java b/src/main/java/org/openapitools/client/model/DisputeAttributesStatusHistoryInner.java index b1681b12..59d4a4b7 100644 --- a/src/main/java/org/openapitools/client/model/DisputeAttributesStatusHistoryInner.java +++ b/src/main/java/org/openapitools/client/model/DisputeAttributesStatusHistoryInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DisputeRelationships.java b/src/main/java/org/openapitools/client/model/DisputeRelationships.java index 29bc1ce7..25dfa0c1 100644 --- a/src/main/java/org/openapitools/client/model/DisputeRelationships.java +++ b/src/main/java/org/openapitools/client/model/DisputeRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DisputeSettlementTransaction.java b/src/main/java/org/openapitools/client/model/DisputeSettlementTransaction.java index 66bd5ced..ece1fd89 100644 --- a/src/main/java/org/openapitools/client/model/DisputeSettlementTransaction.java +++ b/src/main/java/org/openapitools/client/model/DisputeSettlementTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DisputeTransaction.java b/src/main/java/org/openapitools/client/model/DisputeTransaction.java index 70517cbc..2d6d27c6 100644 --- a/src/main/java/org/openapitools/client/model/DisputeTransaction.java +++ b/src/main/java/org/openapitools/client/model/DisputeTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DisputeTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/DisputeTransactionAllOfAttributes.java index f968a354..cfb0b20e 100644 --- a/src/main/java/org/openapitools/client/model/DisputeTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/DisputeTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Document.java b/src/main/java/org/openapitools/client/model/Document.java index dfa810a8..0037de54 100644 --- a/src/main/java/org/openapitools/client/model/Document.java +++ b/src/main/java/org/openapitools/client/model/Document.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DocumentAttributes.java b/src/main/java/org/openapitools/client/model/DocumentAttributes.java index b21429a2..14fa30b7 100644 --- a/src/main/java/org/openapitools/client/model/DocumentAttributes.java +++ b/src/main/java/org/openapitools/client/model/DocumentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DocumentsRelationship.java b/src/main/java/org/openapitools/client/model/DocumentsRelationship.java index 883025c3..64fffa46 100644 --- a/src/main/java/org/openapitools/client/model/DocumentsRelationship.java +++ b/src/main/java/org/openapitools/client/model/DocumentsRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/DocumentsRelationshipDataInner.java b/src/main/java/org/openapitools/client/model/DocumentsRelationshipDataInner.java index af2de5c1..0e0db077 100644 --- a/src/main/java/org/openapitools/client/model/DocumentsRelationshipDataInner.java +++ b/src/main/java/org/openapitools/client/model/DocumentsRelationshipDataInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/EntityType.java b/src/main/java/org/openapitools/client/model/EntityType.java index 331561d7..3ff100d3 100644 --- a/src/main/java/org/openapitools/client/model/EntityType.java +++ b/src/main/java/org/openapitools/client/model/EntityType.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/EvaluationParams.java b/src/main/java/org/openapitools/client/model/EvaluationParams.java index dbb3a4d8..21059129 100644 --- a/src/main/java/org/openapitools/client/model/EvaluationParams.java +++ b/src/main/java/org/openapitools/client/model/EvaluationParams.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Event.java b/src/main/java/org/openapitools/client/model/Event.java index 66869e24..49bd4dd2 100644 --- a/src/main/java/org/openapitools/client/model/Event.java +++ b/src/main/java/org/openapitools/client/model/Event.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter.java index c928a881..8f3bbd7a 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter1.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter1.java index f23b0d41..5e3ac5e4 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter1.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter10.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter10.java index bb8e1381..69fdb5fb 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter10.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter10.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,7 +38,6 @@ import java.io.IOException; import java.lang.reflect.Type; -import java.util.stream.Collectors; import org.openapitools.client.JSON; import org.openapitools.client.Pair; @@ -264,23 +263,22 @@ public String toJson() { return JSON.getGson().toJson(this); } + public List toParams() { + List params = new ArrayList<>(); - public List toParams(){ - List params = new ArrayList<>(); - - if(this.accountId != null){ - params.add(new Pair("filter[accountId]", this.accountId)); - } + if (this.accountId != null) { + params.add(new Pair("filter[accountId]", this.accountId)); + } - if(this.customerId != null){ - params.add(new Pair("filter[customerId]", this.customerId)); - } + if (this.customerId != null) { + params.add(new Pair("filter[customerId]", this.customerId)); + } - if(this.period != null){ - params.add(new Pair("filter[period]", this.period)); - } + if (this.period != null) { + params.add(new Pair("filter[period]", this.period)); + } - return params; - } + return params; + } } diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter11.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter11.java index 63ed01b8..0e436796 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter11.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter11.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,20 +16,34 @@ import java.util.*; import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.Map; import java.util.stream.Collectors; -import org.openapitools.client.Pair; + import org.openapitools.client.JSON; +import org.openapitools.client.Pair; /** * ExecuteFilterParameter11 @@ -444,48 +458,48 @@ public String toJson() { } public List toParams(){ - List params = new ArrayList<>(); + List params = new ArrayList<>(); - if(this.cardId != null){ - params.add(new Pair("filter[cardId]", this.cardId)); - } - - if(this.customerId != null){ - params.add(new Pair("filter[customerId]", this.customerId)); - } + if(this.cardId != null){ + params.add(new Pair("filter[cardId]", this.cardId)); + } - if(this.transactionId != null){ - params.add(new Pair("filter[transactionId]", this.transactionId)); - } + if(this.customerId != null){ + params.add(new Pair("filter[customerId]", this.customerId)); + } - if(this.since != null){ - params.add(new Pair("filter[since]", this.since)); - } + if(this.transactionId != null){ + params.add(new Pair("filter[transactionId]", this.transactionId)); + } - if(this.until != null){ - params.add(new Pair("filter[until]", this.until)); - } + if(this.since != null){ + params.add(new Pair("filter[since]", this.since)); + } - if(this.status != null){ - params.add(new Pair("filter[status]", this.status)); - } + if(this.until != null){ + params.add(new Pair("filter[until]", this.until)); + } - if(this.receivingAccountId != null){ - params.add(new Pair("filter[receivingAccountId]", this.receivingAccountId)); - } + if(this.status != null){ + params.add(new Pair("filter[status]", this.status)); + } - if(this.rewardedTransactionId != null){ - params.add(new Pair("filter[rewardedTransactionId]", this.rewardedTransactionId)); - } + if(this.receivingAccountId != null){ + params.add(new Pair("filter[receivingAccountId]", this.receivingAccountId)); + } - if(this.tags != null){ - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } + if(this.rewardedTransactionId != null){ + params.add(new Pair("filter[rewardedTransactionId]", this.rewardedTransactionId)); + } - return params; + if(this.tags != null){ + String tagsAsString = this.tags.keySet().stream() + .map(key -> key + ":" + this.tags.get(key)) + .collect(Collectors.joining(", ", "{", "}")); + params.add(new Pair("filter[tags]", tagsAsString)); } + + return params; + } } diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter12.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter12.java index 243edb1b..4006f819 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter12.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter12.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -45,7 +45,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import org.openapitools.client.JSON; import org.openapitools.client.Pair; @@ -280,26 +279,26 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ - List params = new ArrayList<>(); + public List toParams() { + List params = new ArrayList<>(); - if(this.since != null){ - params.add(new Pair("filter[since]", this.since)); - } + if (this.since != null) { + params.add(new Pair("filter[since]", this.since)); + } - if(this.until != null){ - params.add(new Pair("filter[until]", this.until)); - } + if (this.until != null) { + params.add(new Pair("filter[until]", this.until)); + } - if(this.type != null){ - int i=0; - for (String t:this.type) { - params.add(new Pair(String.format("filter[type][%s]", i), t)); - i++; - } - } + if (this.type != null) { + int i = 0; + for (String t : this.type) { + params.add(new Pair(String.format("filter[type][%s]", i), t)); + i++; + } + } - return params; - } + return params; + } } diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter13.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter13.java index 8f2b2e5a..6f8fa5a3 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter13.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter13.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -382,20 +382,19 @@ public static ExecuteFilterParameter13 fromJson(String jsonString) throws IOExce public String toJson() { return JSON.getGson().toJson(this); } - - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.accountId != null){ + if (this.accountId != null) { params.add(new Pair("filter[accountId]", this.accountId)); } - if(this.customerId != null){ + if (this.customerId != null) { params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.tags != null){ + if (this.tags != null) { String tagsAsString = this.tags.keySet().stream() .map(key -> key + ":" + this.tags.get(key)) .collect(Collectors.joining(", ", "{", "}")); diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter14.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter14.java index ef175b38..513e802b 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter14.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter14.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,7 +38,6 @@ import java.io.IOException; import java.lang.reflect.Type; -import java.util.stream.Collectors; import org.openapitools.client.JSON; import org.openapitools.client.Pair; @@ -288,22 +287,22 @@ public static ExecuteFilterParameter14 fromJson(String jsonString) throws IOExce public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.fromId != null){ + if (this.fromId != null) { params.add(new Pair("filter[fromId]", this.fromId.toString())); } - if(this.toId != null){ + if (this.toId != null) { params.add(new Pair("filter[toId]", this.toId.toString())); } - if(this.since != null){ + if (this.since != null) { params.add(new Pair("filter[since]", this.since)); } - if(this.until != null){ + if (this.until != null) { params.add(new Pair("filter[until]", this.until)); } diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter15.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter15.java index 432f07f9..0c33b2c0 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter15.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter15.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -40,7 +40,6 @@ import java.io.IOException; import java.lang.reflect.Type; -import java.util.stream.Collectors; import org.openapitools.client.JSON; import org.openapitools.client.Pair; @@ -50,247 +49,250 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ExecuteFilterParameter15 { - public static final String SERIALIZED_NAME_COORDINATES = "coordinates"; - @SerializedName(SERIALIZED_NAME_COORDINATES) - private Object coordinates; + public static final String SERIALIZED_NAME_COORDINATES = "coordinates"; + @SerializedName(SERIALIZED_NAME_COORDINATES) + private Object coordinates; - public static final String SERIALIZED_NAME_SEARCH_RADIUS = "searchRadius"; - @SerializedName(SERIALIZED_NAME_SEARCH_RADIUS) - private Integer searchRadius; - - public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; - @SerializedName(SERIALIZED_NAME_POSTAL_CODE) - private String postalCode; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Object address; - - public ExecuteFilterParameter15() { - } - - public ExecuteFilterParameter15 coordinates(Object coordinates) { - - this.coordinates = coordinates; - return this; - } - - /** - * Get coordinates - * @return coordinates - **/ - @javax.annotation.Nullable - public Object getCoordinates() { - return coordinates; - } - - - public void setCoordinates(Object coordinates) { - this.coordinates = coordinates; - } - - - public ExecuteFilterParameter15 searchRadius(Integer searchRadius) { - - this.searchRadius = searchRadius; - return this; - } - - /** - * Get searchRadius - * @return searchRadius - **/ - @javax.annotation.Nullable - public Integer getSearchRadius() { - return searchRadius; - } - - - public void setSearchRadius(Integer searchRadius) { - this.searchRadius = searchRadius; - } - - - public ExecuteFilterParameter15 postalCode(String postalCode) { - - this.postalCode = postalCode; - return this; - } - - /** - * Get postalCode - * @return postalCode - **/ - @javax.annotation.Nullable - public String getPostalCode() { - return postalCode; - } - - - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } - - - public ExecuteFilterParameter15 address(Object address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Object getAddress() { - return address; - } - - - public void setAddress(Object address) { - this.address = address; - } + public static final String SERIALIZED_NAME_SEARCH_RADIUS = "searchRadius"; + @SerializedName(SERIALIZED_NAME_SEARCH_RADIUS) + private Integer searchRadius; + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private Object address; - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public ExecuteFilterParameter15() { } - if (o == null || getClass() != o.getClass()) { - return false; + + public ExecuteFilterParameter15 coordinates(Object coordinates) { + + this.coordinates = coordinates; + return this; + } + + /** + * Get coordinates + * + * @return coordinates + **/ + @javax.annotation.Nullable + public Object getCoordinates() { + return coordinates; + } + + + public void setCoordinates(Object coordinates) { + this.coordinates = coordinates; + } + + + public ExecuteFilterParameter15 searchRadius(Integer searchRadius) { + + this.searchRadius = searchRadius; + return this; + } + + /** + * Get searchRadius + * + * @return searchRadius + **/ + @javax.annotation.Nullable + public Integer getSearchRadius() { + return searchRadius; + } + + + public void setSearchRadius(Integer searchRadius) { + this.searchRadius = searchRadius; + } + + + public ExecuteFilterParameter15 postalCode(String postalCode) { + + this.postalCode = postalCode; + return this; } - ExecuteFilterParameter15 executeFilterParameter15 = (ExecuteFilterParameter15) o; - return Objects.equals(this.coordinates, executeFilterParameter15.coordinates) && - Objects.equals(this.searchRadius, executeFilterParameter15.searchRadius) && - Objects.equals(this.postalCode, executeFilterParameter15.postalCode) && - Objects.equals(this.address, executeFilterParameter15.address); - } - - @Override - public int hashCode() { - return Objects.hash(coordinates, searchRadius, postalCode, address); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter15 {\n"); - sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); - sb.append(" searchRadius: ").append(toIndentedString(searchRadius)).append("\n"); - sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + /** + * Get postalCode + * + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("coordinates"); - openapiFields.add("searchRadius"); - openapiFields.add("postalCode"); - openapiFields.add("address"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter15 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter15.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter15 is not found in the empty JSON string", ExecuteFilterParameter15.openapiRequiredFields.toString())); + + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public ExecuteFilterParameter15 address(Object address) { + + this.address = address; + return this; + } + + /** + * Get address + * + * @return address + **/ + @javax.annotation.Nullable + public Object getAddress() { + return address; + } + + + public void setAddress(Object address) { + this.address = address; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; } - } + ExecuteFilterParameter15 executeFilterParameter15 = (ExecuteFilterParameter15) o; + return Objects.equals(this.coordinates, executeFilterParameter15.coordinates) && + Objects.equals(this.searchRadius, executeFilterParameter15.searchRadius) && + Objects.equals(this.postalCode, executeFilterParameter15.postalCode) && + Objects.equals(this.address, executeFilterParameter15.address); + } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter15.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter15` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + @Override + public int hashCode() { + return Objects.hash(coordinates, searchRadius, postalCode, address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter15 {\n"); + sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); + sb.append(" searchRadius: ").append(toIndentedString(searchRadius)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("coordinates"); + openapiFields.add("searchRadius"); + openapiFields.add("postalCode"); + openapiFields.add("address"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter15 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExecuteFilterParameter15.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter15 is not found in the empty JSON string", ExecuteFilterParameter15.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExecuteFilterParameter15.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter15` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); - } - } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter15.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter15' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter15.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter15 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter15 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExecuteFilterParameter15.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExecuteFilterParameter15' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter15.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExecuteFilterParameter15 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExecuteFilterParameter15 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExecuteFilterParameter15 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExecuteFilterParameter15 + * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter15 + */ + public static ExecuteFilterParameter15 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter15.class); + } + + /** + * Convert an instance of ExecuteFilterParameter15 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); } - } - - /** - * Create an instance of ExecuteFilterParameter15 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter15 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter15 - */ - public static ExecuteFilterParameter15 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter15.class); - } - - /** - * Convert an instance of ExecuteFilterParameter15 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - public List toParams(){ - List params = new ArrayList<>(); - if(this.address != null) { + public List toParams() { + List params = new ArrayList<>(); + if (this.address != null) { ObjectMapper objectMapper = new ObjectMapper(); try { String addressAsString = objectMapper.writeValueAsString(this.address); @@ -300,15 +302,15 @@ public List toParams(){ } } - if(this.postalCode != null){ + if (this.postalCode != null) { params.add(new Pair("filter[postalCode]", this.postalCode)); } - if(this.searchRadius != null){ + if (this.searchRadius != null) { params.add(new Pair("filter[searchRadius]", this.searchRadius.toString())); } - if(this.coordinates != null) { + if (this.coordinates != null) { ObjectMapper objectMapper = new ObjectMapper(); try { String coordinatesAsString = objectMapper.writeValueAsString(this.coordinates); diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter16.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter16.java index 4412b613..54e7a99f 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter16.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter16.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -644,66 +644,66 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.cardId != null){ + if (this.cardId != null) { params.add(new Pair("filter[cardId]", this.cardId)); } - if(this.customerId != null){ + if (this.customerId != null) { params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.accountId != null){ + if (this.accountId != null) { params.add(new Pair("filter[accountId]", this.accountId)); } - if(this.since != null){ + if (this.since != null) { params.add(new Pair("filter[since]", this.since)); } - if(this.until != null){ + if (this.until != null) { params.add(new Pair("filter[until]", this.until)); } - if(this.type != null){ - int i=0; - for (String t:this.type) { + if (this.type != null) { + int i = 0; + for (String t : this.type) { params.add(new Pair(String.format("filter[type][%s]", i), t)); i++; } } - if(this.direction != null){ - int i=0; - for (DirectionEnum d:this.direction) { + if (this.direction != null) { + int i = 0; + for (DirectionEnum d : this.direction) { params.add(new Pair(String.format("filter[direction][%s]", i), d.getValue())); i++; } } - if(this.fromAmount != null){ + if (this.fromAmount != null) { params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); } - if(this.toAmount != null){ + if (this.toAmount != null) { params.add(new Pair("filter[toAmount]", this.toAmount.toString())); } - if(this.query != null){ + if (this.query != null) { params.add(new Pair("filter[query]", this.query)); } - if(this.accountType != null){ + if (this.accountType != null) { params.add(new Pair("filter[accountType]", this.accountType)); } - if(this.excludeFees != null){ + if (this.excludeFees != null) { params.add(new Pair("filter[excludeFees]", this.excludeFees.toString())); } - if(this.tags != null){ + if (this.tags != null) { String tagsAsString = this.tags.keySet().stream() .map(key -> key + ":" + this.tags.get(key)) .collect(Collectors.joining(", ", "{", "}")); diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter17.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter17.java index 2459859d..080827bd 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter17.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter17.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -201,14 +201,14 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams() { - List params = new ArrayList<>(); + public List toParams() { + List params = new ArrayList<>(); - if (this.query != null) { - params.add(new Pair("filter[query]", this.query)); - } + if (this.query != null) { + params.add(new Pair("filter[query]", this.query)); + } - return params; - } + return params; + } } diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter18.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter18.java index 9b9b9338..dc73b103 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter18.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter18.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -45,7 +45,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import org.openapitools.client.JSON; import org.openapitools.client.Pair; @@ -451,32 +450,32 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.accountId != null){ + if (this.accountId != null) { params.add(new Pair("filter[accountId]", this.accountId)); } - if(this.creditAccountId != null){ + if (this.creditAccountId != null) { params.add(new Pair("filter[creditAccountId]", this.creditAccountId)); } - if(this.customerId != null){ + if (this.customerId != null) { params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { + if (this.status != null) { + int i = 0; + for (StatusEnum s : this.status) { params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); i++; } } - if(this.type != null){ - int i=0; - for (TypeEnum t:this.type) { + if (this.type != null) { + int i = 0; + for (TypeEnum t : this.type) { params.add(new Pair(String.format("filter[type][%s]", i), t.getValue())); i++; } diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter19.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter19.java index 7537f5eb..6c65115d 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter19.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter19.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter2.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter2.java index b7536bb7..01f5bed4 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter2.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter2.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter20.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter20.java index a5e57409..f5ab3778 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter20.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter20.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -513,38 +513,13 @@ public static ExecuteFilterParameter20 fromJson(String jsonString) throws IOExce public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ List params = new ArrayList<>(); - if(this.accountId != null){ - params.add(new Pair("filter[accountId]", this.accountId)); - } - if(this.customerId != null){ params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.since != null){ - params.add(new Pair("filter[since]", this.since)); - } - - if(this.until != null){ - params.add(new Pair("filter[until]", this.until)); - } - - if(this.checkNumber != null){ - params.add(new Pair("filter[checkNumber]", this.checkNumber)); - } - - if(this.fromAmount != null){ - params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); - } - - if(this.toAmount != null){ - params.add(new Pair("filter[toAmount]", this.toAmount.toString())); - } - if(this.status != null){ int i=0; for (StatusEnum s:this.status) { diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter3.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter3.java index a5d74b18..ecb5ed41 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter3.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter3.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -365,26 +365,26 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.email != null){ + if (this.email != null) { params.add(new Pair("filter[email]", this.email)); } - if(this.query != null){ + if (this.query != null) { params.add(new Pair("filter[query]", this.query)); } - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { + if (this.status != null) { + int i = 0; + for (StatusEnum s : this.status) { params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); i++; } } - if(this.tags != null){ + if (this.tags != null) { String tagsAsString = this.tags.keySet().stream() .map(key -> key + ":" + this.tags.get(key)) .collect(Collectors.joining(", ", "{", "}")); diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter4.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter4.java index 776dae13..da7e1cf0 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter4.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter4.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -815,66 +815,66 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.accountId != null){ + if (this.accountId != null) { params.add(new Pair("filter[accountId]", this.accountId)); } - if(this.counterpartyAccountId != null){ + if (this.counterpartyAccountId != null) { params.add(new Pair("filter[counterpartyAccountId]", this.counterpartyAccountId)); } - if(this.customerId != null){ + if (this.customerId != null) { params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.fromAmount != null){ + if (this.fromAmount != null) { params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); } - if(this.recurringPaymentId != null){ + if (this.recurringPaymentId != null) { params.add(new Pair("filter[recurringPaymentId]", this.recurringPaymentId.toString())); } - if(this.toAmount != null){ + if (this.toAmount != null) { params.add(new Pair("filter[toAmount]", this.toAmount.toString())); } - if(this.since != null){ + if (this.since != null) { params.add(new Pair("filter[since]", this.since)); } - if(this.until != null){ + if (this.until != null) { params.add(new Pair("filter[until]", this.until)); } - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { + if (this.status != null) { + int i = 0; + for (StatusEnum s : this.status) { params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); i++; } } - if(this.direction != null){ - int i=0; - for (DirectionEnum d:this.direction) { + if (this.direction != null) { + int i = 0; + for (DirectionEnum d : this.direction) { params.add(new Pair(String.format("filter[direction][%s]", i), d.getValue())); i++; } } - if(this.feature != null){ - int i=0; - for (FeatureEnum f:this.feature) { + if (this.feature != null) { + int i = 0; + for (FeatureEnum f : this.feature) { params.add(new Pair(String.format("filter[status][%s]", i), f.getValue())); i++; } } - if(this.tags != null){ + if (this.tags != null) { String tagsAsString = this.tags.keySet().stream() .map(key -> key + ":" + this.tags.get(key)) .collect(Collectors.joining(", ", "{", "}")); diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter5.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter5.java index 76152b18..a5f33859 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter5.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter5.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -398,30 +398,30 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.accountNumber != null){ + if (this.accountNumber != null) { params.add(new Pair("filter[accountNumber]", this.accountNumber)); } - if(this.customerId != null){ + if (this.customerId != null) { params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.routingNumber != null){ + if (this.routingNumber != null) { params.add(new Pair("filter[routingNumber]", this.routingNumber)); } - if(this.permissions != null){ - int i=0; - for (PermissionsEnum p:this.permissions) { + if (this.permissions != null) { + int i = 0; + for (PermissionsEnum p : this.permissions) { params.add(new Pair(String.format("filter[permissions][%s]", i), p.getValue())); i++; } } - if(this.tags != null){ + if (this.tags != null) { String tagsAsString = this.tags.keySet().stream() .map(key -> key + ":" + this.tags.get(key)) .collect(Collectors.joining(", ", "{", "}")); diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter6.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter6.java index 8513302f..3b98ef92 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter6.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter6.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -45,7 +45,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import org.openapitools.client.JSON; import org.openapitools.client.Pair; @@ -493,45 +492,44 @@ public String toJson() { return JSON.getGson().toJson(this); } - - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.accountId != null){ + if (this.accountId != null) { params.add(new Pair("filter[accountId]", this.accountId)); } - if(this.customerId != null){ + if (this.customerId != null) { params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.fromEndTime != null){ + if (this.fromEndTime != null) { params.add(new Pair("filter[fromEndTime]", this.fromEndTime)); } - if(this.toEndTime != null){ + if (this.toEndTime != null) { params.add(new Pair("filter[toEndTime]", this.toEndTime)); } - if(this.fromStartTime != null){ + if (this.fromStartTime != null) { params.add(new Pair("filter[fromStartTime]", this.fromStartTime)); } - if(this.toStartTime != null){ + if (this.toStartTime != null) { params.add(new Pair("filter[toStartTime]", this.toStartTime)); } - if(this.type != null){ - int i=0; - for (TypeEnum t:this.type) { + if (this.type != null) { + int i = 0; + for (TypeEnum t : this.type) { params.add(new Pair(String.format("filter[type][%s]", i), t.getValue())); i++; } } - if(this.status != null){ - int i=0; - for (String s:this.status) { + if (this.status != null) { + int i = 0; + for (String s : this.status) { params.add(new Pair(String.format("filter[status][%s]", i), s)); i++; } diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter7.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter7.java index 34e3ee0e..5ec189eb 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter7.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter7.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -375,26 +375,26 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.accountId != null){ + if (this.accountId != null) { params.add(new Pair("filter[accountId]", this.accountId)); } - if(this.customerId != null){ + if (this.customerId != null) { params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { + if (this.status != null) { + int i = 0; + for (StatusEnum s : this.status) { params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); i++; } } - if(this.tags != null){ + if (this.tags != null) { String tagsAsString = this.tags.keySet().stream() .map(key -> key + ":" + this.tags.get(key)) .collect(Collectors.joining(", ", "{", "}")); diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter8.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter8.java index d23176c3..47cf3d5c 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter8.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter8.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -45,7 +45,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import org.openapitools.client.JSON; import org.openapitools.client.Pair; @@ -579,56 +578,56 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.accountId != null){ + if (this.accountId != null) { params.add(new Pair("filter[accountId]", this.accountId)); } - if(this.customerId != null){ + if (this.customerId != null) { params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.cardId != null){ + if (this.cardId != null) { params.add(new Pair("filter[cardId]", this.cardId)); } - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { + if (this.status != null) { + int i = 0; + for (StatusEnum s : this.status) { params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); i++; } } - if(this.fromAmount != null){ + if (this.fromAmount != null) { params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); } - if(this.toAmount != null){ + if (this.toAmount != null) { params.add(new Pair("filter[toAmount]", this.toAmount.toString())); } - if(this.includeNonAuthorized != null){ + if (this.includeNonAuthorized != null) { params.add(new Pair("filter[includeNonAuthorized]", this.includeNonAuthorized.toString())); } - if(this.accountType != null){ + if (this.accountType != null) { params.add(new Pair("filter[accountType]", this.accountType)); } - if(this.since != null){ + if (this.since != null) { params.add(new Pair("filter[since]", this.since)); } - if(this.until != null){ + if (this.until != null) { params.add(new Pair("filter[until]", this.until)); } - if(this.merchantCategoryCode != null){ - int i=0; - for (String m:this.merchantCategoryCode) { + if (this.merchantCategoryCode != null) { + int i = 0; + for (String m : this.merchantCategoryCode) { params.add(new Pair(String.format("filter[merchantCategoryCode][%s]", i), m)); i++; } diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter9.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter9.java index d6883fe0..b958fee6 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter9.java +++ b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter9.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -45,7 +45,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import org.openapitools.client.JSON; import org.openapitools.client.Pair; @@ -336,28 +335,28 @@ public String toJson() { return JSON.getGson().toJson(this); } - public List toParams(){ + public List toParams() { List params = new ArrayList<>(); - if(this.accountId != null){ + if (this.accountId != null) { params.add(new Pair("filter[accountId]", this.accountId)); } - if(this.customerId != null){ + if (this.customerId != null) { params.add(new Pair("filter[customerId]", this.customerId)); } - if(this.fromAmount != null){ + if (this.fromAmount != null) { params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); } - if(this.toAmount != null){ + if (this.toAmount != null) { params.add(new Pair("filter[toAmount]", this.toAmount.toString())); } - if(this.merchantCategoryCode != null){ - int i=0; - for (String m:this.merchantCategoryCode) { + if (this.merchantCategoryCode != null) { + int i = 0; + for (String m : this.merchantCategoryCode) { params.add(new Pair(String.format("filter[merchantCategoryCode][%s]", i), m)); i++; } diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest10.java b/src/main/java/org/openapitools/client/model/ExecuteRequest10.java deleted file mode 100644 index a3d67f26..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest10.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.ApproveAuthorizationRequest; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest10 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest10 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ApproveAuthorizationRequest data; - - public ExecuteRequest10() { - } - - public ExecuteRequest10 data(ApproveAuthorizationRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ApproveAuthorizationRequest getData() { - return data; - } - - - public void setData(ApproveAuthorizationRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest10 executeRequest10 = (ExecuteRequest10) o; - return Objects.equals(this.data, executeRequest10.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest10 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest10 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest10.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest10 is not found in the empty JSON string", ExecuteRequest10.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest10.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest10` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ApproveAuthorizationRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest10.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest10' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest10.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest10 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest10 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest10 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest10 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest10 - */ - public static ExecuteRequest10 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest10.class); - } - - /** - * Convert an instance of ExecuteRequest10 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest11.java b/src/main/java/org/openapitools/client/model/ExecuteRequest11.java deleted file mode 100644 index 2025fc63..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest11.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.DeclineAuthorizationRequest; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest11 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest11 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private DeclineAuthorizationRequest data; - - public ExecuteRequest11() { - } - - public ExecuteRequest11 data(DeclineAuthorizationRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public DeclineAuthorizationRequest getData() { - return data; - } - - - public void setData(DeclineAuthorizationRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest11 executeRequest11 = (ExecuteRequest11) o; - return Objects.equals(this.data, executeRequest11.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest11 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest11 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest11.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest11 is not found in the empty JSON string", ExecuteRequest11.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest11.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest11` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - DeclineAuthorizationRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest11.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest11' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest11.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest11 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest11 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest11 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest11 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest11 - */ - public static ExecuteRequest11 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest11.class); - } - - /** - * Convert an instance of ExecuteRequest11 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest12.java b/src/main/java/org/openapitools/client/model/ExecuteRequest12.java deleted file mode 100644 index e76f99e6..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest12.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreateReward; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest12 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest12 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateReward data; - - public ExecuteRequest12() { - } - - public ExecuteRequest12 data(CreateReward data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateReward getData() { - return data; - } - - - public void setData(CreateReward data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest12 executeRequest12 = (ExecuteRequest12) o; - return Objects.equals(this.data, executeRequest12.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest12 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest12 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest12.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest12 is not found in the empty JSON string", ExecuteRequest12.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest12.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest12` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateReward.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest12.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest12' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest12.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest12 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest12 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest12 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest12 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest12 - */ - public static ExecuteRequest12 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest12.class); - } - - /** - * Convert an instance of ExecuteRequest12 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest13.java b/src/main/java/org/openapitools/client/model/ExecuteRequest13.java deleted file mode 100644 index f7558e25..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest13.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreateFee; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest13 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest13 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateFee data; - - public ExecuteRequest13() { - } - - public ExecuteRequest13 data(CreateFee data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateFee getData() { - return data; - } - - - public void setData(CreateFee data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest13 executeRequest13 = (ExecuteRequest13) o; - return Objects.equals(this.data, executeRequest13.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest13 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest13 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest13.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest13 is not found in the empty JSON string", ExecuteRequest13.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest13.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest13` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateFee.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest13.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest13' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest13.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest13 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest13 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest13 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest13 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest13 - */ - public static ExecuteRequest13 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest13.class); - } - - /** - * Convert an instance of ExecuteRequest13 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest16.java b/src/main/java/org/openapitools/client/model/ExecuteRequest16.java deleted file mode 100644 index 02e39fae..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest16.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreateCustomerToken; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest16 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest16 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCustomerToken data; - - public ExecuteRequest16() { - } - - public ExecuteRequest16 data(CreateCustomerToken data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCustomerToken getData() { - return data; - } - - - public void setData(CreateCustomerToken data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest16 executeRequest16 = (ExecuteRequest16) o; - return Objects.equals(this.data, executeRequest16.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest16 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest16 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest16.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest16 is not found in the empty JSON string", ExecuteRequest16.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest16.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest16` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCustomerToken.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest16.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest16' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest16.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest16 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest16 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest16 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest16 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest16 - */ - public static ExecuteRequest16 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest16.class); - } - - /** - * Convert an instance of ExecuteRequest16 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest17.java b/src/main/java/org/openapitools/client/model/ExecuteRequest17.java deleted file mode 100644 index 36df8d61..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest17.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreateCustomerTokenVerification; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest17 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest17 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCustomerTokenVerification data; - - public ExecuteRequest17() { - } - - public ExecuteRequest17 data(CreateCustomerTokenVerification data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCustomerTokenVerification getData() { - return data; - } - - - public void setData(CreateCustomerTokenVerification data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest17 executeRequest17 = (ExecuteRequest17) o; - return Objects.equals(this.data, executeRequest17.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest17 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest17 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest17.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest17 is not found in the empty JSON string", ExecuteRequest17.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest17.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest17` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCustomerTokenVerification.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest17.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest17' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest17.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest17 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest17 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest17 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest17 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest17 - */ - public static ExecuteRequest17 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest17.class); - } - - /** - * Convert an instance of ExecuteRequest17 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest18.java b/src/main/java/org/openapitools/client/model/ExecuteRequest18.java deleted file mode 100644 index 53e5155d..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest18.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreateRepayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest18 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest18 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateRepayment data; - - public ExecuteRequest18() { - } - - public ExecuteRequest18 data(CreateRepayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateRepayment getData() { - return data; - } - - - public void setData(CreateRepayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest18 executeRequest18 = (ExecuteRequest18) o; - return Objects.equals(this.data, executeRequest18.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest18 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest18 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest18.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest18 is not found in the empty JSON string", ExecuteRequest18.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest18.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest18` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateRepayment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest18.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest18' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest18.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest18 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest18 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest18 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest18 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest18 - */ - public static ExecuteRequest18 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest18.class); - } - - /** - * Convert an instance of ExecuteRequest18 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest19.java b/src/main/java/org/openapitools/client/model/ExecuteRequest19.java deleted file mode 100644 index 154b4069..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest19.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreateCheckPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest19 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest19 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCheckPayment data; - - public ExecuteRequest19() { - } - - public ExecuteRequest19 data(CreateCheckPayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCheckPayment getData() { - return data; - } - - - public void setData(CreateCheckPayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest19 executeRequest19 = (ExecuteRequest19) o; - return Objects.equals(this.data, executeRequest19.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest19 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest19 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest19.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest19 is not found in the empty JSON string", ExecuteRequest19.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest19.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest19` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCheckPayment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest19.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest19' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest19.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest19 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest19 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest19 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest19 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest19 - */ - public static ExecuteRequest19 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest19.class); - } - - /** - * Convert an instance of ExecuteRequest19 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest20.java b/src/main/java/org/openapitools/client/model/ExecuteRequest20.java deleted file mode 100644 index 7c6a5c38..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest20.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.ExecuteRequest20Data; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest20 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest20 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ExecuteRequest20Data data; - - public ExecuteRequest20() { - } - - public ExecuteRequest20 data(ExecuteRequest20Data data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ExecuteRequest20Data getData() { - return data; - } - - - public void setData(ExecuteRequest20Data data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest20 executeRequest20 = (ExecuteRequest20) o; - return Objects.equals(this.data, executeRequest20.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest20 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest20 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest20.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest20 is not found in the empty JSON string", ExecuteRequest20.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest20.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest20` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ExecuteRequest20Data.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest20.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest20' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest20.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest20 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest20 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest20 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest20 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest20 - */ - public static ExecuteRequest20 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest20.class); - } - - /** - * Convert an instance of ExecuteRequest20 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest21.java b/src/main/java/org/openapitools/client/model/ExecuteRequest21.java deleted file mode 100644 index 4b975cd6..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest21.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.ExecuteRequest21Data; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest21 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest21 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ExecuteRequest21Data data; - - public ExecuteRequest21() { - } - - public ExecuteRequest21 data(ExecuteRequest21Data data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ExecuteRequest21Data getData() { - return data; - } - - - public void setData(ExecuteRequest21Data data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest21 executeRequest21 = (ExecuteRequest21) o; - return Objects.equals(this.data, executeRequest21.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest21 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest21 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest21.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest21 is not found in the empty JSON string", ExecuteRequest21.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest21.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest21` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ExecuteRequest21Data.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest21.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest21' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest21.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest21 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest21 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest21 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest21 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest21 - */ - public static ExecuteRequest21 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest21.class); - } - - /** - * Convert an instance of ExecuteRequest21 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest3.java b/src/main/java/org/openapitools/client/model/ExecuteRequest3.java deleted file mode 100644 index 878c702c..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest3.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.FreezeAccountRequest; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest3 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest3 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private FreezeAccountRequest data; - - public ExecuteRequest3() { - } - - public ExecuteRequest3 data(FreezeAccountRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public FreezeAccountRequest getData() { - return data; - } - - - public void setData(FreezeAccountRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest3 executeRequest3 = (ExecuteRequest3) o; - return Objects.equals(this.data, executeRequest3.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest3 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest3 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest3.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest3 is not found in the empty JSON string", ExecuteRequest3.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest3.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest3` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - FreezeAccountRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest3.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest3' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest3.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest3 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest3 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest3 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest3 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest3 - */ - public static ExecuteRequest3 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest3.class); - } - - /** - * Convert an instance of ExecuteRequest3 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest4.java b/src/main/java/org/openapitools/client/model/ExecuteRequest4.java deleted file mode 100644 index 8890e875..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest4.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CloseAccountRequest; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest4 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest4 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CloseAccountRequest data; - - public ExecuteRequest4() { - } - - public ExecuteRequest4 data(CloseAccountRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CloseAccountRequest getData() { - return data; - } - - - public void setData(CloseAccountRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest4 executeRequest4 = (ExecuteRequest4) o; - return Objects.equals(this.data, executeRequest4.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest4 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest4 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest4.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest4 is not found in the empty JSON string", ExecuteRequest4.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest4.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest4` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CloseAccountRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest4.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest4' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest4.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest4 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest4 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest4 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest4 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest4 - */ - public static ExecuteRequest4 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest4.class); - } - - /** - * Convert an instance of ExecuteRequest4 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest6.java b/src/main/java/org/openapitools/client/model/ExecuteRequest6.java deleted file mode 100644 index 358e8afd..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest6.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreatePayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest6 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest6 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreatePayment data; - - public ExecuteRequest6() { - } - - public ExecuteRequest6 data(CreatePayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreatePayment getData() { - return data; - } - - - public void setData(CreatePayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest6 executeRequest6 = (ExecuteRequest6) o; - return Objects.equals(this.data, executeRequest6.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest6 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest6 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest6.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest6 is not found in the empty JSON string", ExecuteRequest6.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest6.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest6` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreatePayment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest6.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest6' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest6.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest6 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest6 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest6 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest6 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest6 - */ - public static ExecuteRequest6 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest6.class); - } - - /** - * Convert an instance of ExecuteRequest6 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest7.java b/src/main/java/org/openapitools/client/model/ExecuteRequest7.java deleted file mode 100644 index 137c0cbd..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest7.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreateCounterparty; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest7 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest7 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCounterparty data; - - public ExecuteRequest7() { - } - - public ExecuteRequest7 data(CreateCounterparty data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCounterparty getData() { - return data; - } - - - public void setData(CreateCounterparty data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest7 executeRequest7 = (ExecuteRequest7) o; - return Objects.equals(this.data, executeRequest7.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest7 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest7 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest7.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest7 is not found in the empty JSON string", ExecuteRequest7.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest7.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest7` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCounterparty.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest7.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest7' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest7.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest7 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest7 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest7 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest7 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest7 - */ - public static ExecuteRequest7 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest7.class); - } - - /** - * Convert an instance of ExecuteRequest7 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest8.java b/src/main/java/org/openapitools/client/model/ExecuteRequest8.java deleted file mode 100644 index d27da7f0..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest8.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreateRecurringPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest8 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest8 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateRecurringPayment data; - - public ExecuteRequest8() { - } - - public ExecuteRequest8 data(CreateRecurringPayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateRecurringPayment getData() { - return data; - } - - - public void setData(CreateRecurringPayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest8 executeRequest8 = (ExecuteRequest8) o; - return Objects.equals(this.data, executeRequest8.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest8 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest8 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest8.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest8 is not found in the empty JSON string", ExecuteRequest8.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest8.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest8` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateRecurringPayment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest8.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest8' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest8.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest8 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest8 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest8 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest8 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest8 - */ - public static ExecuteRequest8 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest8.class); - } - - /** - * Convert an instance of ExecuteRequest8 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest9.java b/src/main/java/org/openapitools/client/model/ExecuteRequest9.java deleted file mode 100644 index 1d7e85c7..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest9.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.CreateCard; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExecuteRequest9 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest9 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCard data; - - public ExecuteRequest9() { - } - - public ExecuteRequest9 data(CreateCard data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCard getData() { - return data; - } - - - public void setData(CreateCard data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteRequest9 executeRequest9 = (ExecuteRequest9) o; - return Objects.equals(this.data, executeRequest9.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest9 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest9 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteRequest9.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest9 is not found in the empty JSON string", ExecuteRequest9.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteRequest9.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest9` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCard.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest9.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest9' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest9.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteRequest9 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteRequest9 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteRequest9 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteRequest9 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest9 - */ - public static ExecuteRequest9 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest9.class); - } - - /** - * Convert an instance of ExecuteRequest9 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Fee.java b/src/main/java/org/openapitools/client/model/Fee.java index 451be7d3..1b2ad18f 100644 --- a/src/main/java/org/openapitools/client/model/Fee.java +++ b/src/main/java/org/openapitools/client/model/Fee.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/FeeAttributes.java b/src/main/java/org/openapitools/client/model/FeeAttributes.java index 22ac0a07..2bf5a3c6 100644 --- a/src/main/java/org/openapitools/client/model/FeeAttributes.java +++ b/src/main/java/org/openapitools/client/model/FeeAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/FeeRelationships.java b/src/main/java/org/openapitools/client/model/FeeRelationships.java index 72c9776d..617c7cb6 100644 --- a/src/main/java/org/openapitools/client/model/FeeRelationships.java +++ b/src/main/java/org/openapitools/client/model/FeeRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/FeeTransaction.java b/src/main/java/org/openapitools/client/model/FeeTransaction.java index aed7adad..81444cf4 100644 --- a/src/main/java/org/openapitools/client/model/FeeTransaction.java +++ b/src/main/java/org/openapitools/client/model/FeeTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/FeeTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/FeeTransactionAllOfAttributes.java index b3d1d227..7ad8dbbe 100644 --- a/src/main/java/org/openapitools/client/model/FeeTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/FeeTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/FreezeAccountRequest.java b/src/main/java/org/openapitools/client/model/FreezeAccountRequest.java index 07420c42..132097ae 100644 --- a/src/main/java/org/openapitools/client/model/FreezeAccountRequest.java +++ b/src/main/java/org/openapitools/client/model/FreezeAccountRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.FreezeAccountRequestAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,103 +51,31 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FreezeAccountRequest { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CREDITACCOUNTFREEZE("creditAccountFreeze"), - - ACCOUNTFREEZE("accountFreeze"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FreezeAccountRequestAttributes attributes; + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private FreezeAccountRequest data; public FreezeAccountRequest() { } - public FreezeAccountRequest type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public FreezeAccountRequest attributes(FreezeAccountRequestAttributes attributes) { + public FreezeAccountRequest data(FreezeAccountRequest data) { - this.attributes = attributes; + this.data = data; return this; } /** - * Get attributes - * @return attributes + * Get data + * @return data **/ @javax.annotation.Nullable - public FreezeAccountRequestAttributes getAttributes() { - return attributes; + public FreezeAccountRequest getData() { + return data; } - public void setAttributes(FreezeAccountRequestAttributes attributes) { - this.attributes = attributes; + public void setData(FreezeAccountRequest data) { + this.data = data; } @@ -162,21 +89,19 @@ public boolean equals(Object o) { return false; } FreezeAccountRequest freezeAccountRequest = (FreezeAccountRequest) o; - return Objects.equals(this.type, freezeAccountRequest.type) && - Objects.equals(this.attributes, freezeAccountRequest.attributes); + return Objects.equals(this.data, freezeAccountRequest.data); } @Override public int hashCode() { - return Objects.hash(type, attributes); + return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FreezeAccountRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } @@ -199,8 +124,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -227,12 +151,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - FreezeAccountRequestAttributes.validateJsonElement(jsonObj.get("attributes")); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + FreezeAccountRequest.validateJsonElement(jsonObj.get("data")); } } diff --git a/src/main/java/org/openapitools/client/model/FreezeAccountRequestAttributes.java b/src/main/java/org/openapitools/client/model/FreezeAccountRequestAttributes.java index 577dd88f..056303c2 100644 --- a/src/main/java/org/openapitools/client/model/FreezeAccountRequestAttributes.java +++ b/src/main/java/org/openapitools/client/model/FreezeAccountRequestAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/FullName.java b/src/main/java/org/openapitools/client/model/FullName.java index 4b0155d9..a9e43214 100644 --- a/src/main/java/org/openapitools/client/model/FullName.java +++ b/src/main/java/org/openapitools/client/model/FullName.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Grantor.java b/src/main/java/org/openapitools/client/model/Grantor.java index 520b5b1f..8017aeca 100644 --- a/src/main/java/org/openapitools/client/model/Grantor.java +++ b/src/main/java/org/openapitools/client/model/Grantor.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/HealthcareAmounts.java b/src/main/java/org/openapitools/client/model/HealthcareAmounts.java index 70346c7f..6b3461e8 100644 --- a/src/main/java/org/openapitools/client/model/HealthcareAmounts.java +++ b/src/main/java/org/openapitools/client/model/HealthcareAmounts.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IncludedResourceInner.java b/src/main/java/org/openapitools/client/model/IncludedResourceInner.java index cf67b4ce..7c2ca329 100644 --- a/src/main/java/org/openapitools/client/model/IncludedResourceInner.java +++ b/src/main/java/org/openapitools/client/model/IncludedResourceInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IncomingAchRelationship.java b/src/main/java/org/openapitools/client/model/IncomingAchRelationship.java index 9d42982e..5776d8d5 100644 --- a/src/main/java/org/openapitools/client/model/IncomingAchRelationship.java +++ b/src/main/java/org/openapitools/client/model/IncomingAchRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IncomingAchRelationshipData.java b/src/main/java/org/openapitools/client/model/IncomingAchRelationshipData.java index 18bb87fb..2826bf76 100644 --- a/src/main/java/org/openapitools/client/model/IncomingAchRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/IncomingAchRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IndividualApplication.java b/src/main/java/org/openapitools/client/model/IndividualApplication.java index ffc98166..a6260274 100644 --- a/src/main/java/org/openapitools/client/model/IndividualApplication.java +++ b/src/main/java/org/openapitools/client/model/IndividualApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IndividualApplicationAllOfAttributes.java b/src/main/java/org/openapitools/client/model/IndividualApplicationAllOfAttributes.java index 375720d4..67c036e9 100644 --- a/src/main/java/org/openapitools/client/model/IndividualApplicationAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/IndividualApplicationAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IndividualCustomer.java b/src/main/java/org/openapitools/client/model/IndividualCustomer.java index 2fd939b5..b8851cec 100644 --- a/src/main/java/org/openapitools/client/model/IndividualCustomer.java +++ b/src/main/java/org/openapitools/client/model/IndividualCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IndividualCustomerAllOfAttributes.java b/src/main/java/org/openapitools/client/model/IndividualCustomerAllOfAttributes.java index f1a282f8..698ba03a 100644 --- a/src/main/java/org/openapitools/client/model/IndividualCustomerAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/IndividualCustomerAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IndividualDebitCard.java b/src/main/java/org/openapitools/client/model/IndividualDebitCard.java index 1fe659be..b57dee2e 100644 --- a/src/main/java/org/openapitools/client/model/IndividualDebitCard.java +++ b/src/main/java/org/openapitools/client/model/IndividualDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IndividualDebitCardAllOfAttributes.java b/src/main/java/org/openapitools/client/model/IndividualDebitCardAllOfAttributes.java index bf69c5e3..00d972c2 100644 --- a/src/main/java/org/openapitools/client/model/IndividualDebitCardAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/IndividualDebitCardAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCard.java index 0ee7eae5..9d0f9430 100644 --- a/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCard.java +++ b/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCardAllOfAttributes.java b/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCardAllOfAttributes.java index cca4851e..746ef89e 100644 --- a/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCardAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCardAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Industry.java b/src/main/java/org/openapitools/client/model/Industry.java index 1b819a1b..4b427bb2 100644 --- a/src/main/java/org/openapitools/client/model/Industry.java +++ b/src/main/java/org/openapitools/client/model/Industry.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Institution.java b/src/main/java/org/openapitools/client/model/Institution.java index a8673f44..74fb24ed 100644 --- a/src/main/java/org/openapitools/client/model/Institution.java +++ b/src/main/java/org/openapitools/client/model/Institution.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/InstitutionAttributes.java b/src/main/java/org/openapitools/client/model/InstitutionAttributes.java index ccdd7428..0856fd5f 100644 --- a/src/main/java/org/openapitools/client/model/InstitutionAttributes.java +++ b/src/main/java/org/openapitools/client/model/InstitutionAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/InterchangeTransaction.java b/src/main/java/org/openapitools/client/model/InterchangeTransaction.java index 29f7139a..a390ad2d 100644 --- a/src/main/java/org/openapitools/client/model/InterchangeTransaction.java +++ b/src/main/java/org/openapitools/client/model/InterchangeTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/InterestShareTransaction.java b/src/main/java/org/openapitools/client/model/InterestShareTransaction.java index c05832e9..f16ef7d8 100644 --- a/src/main/java/org/openapitools/client/model/InterestShareTransaction.java +++ b/src/main/java/org/openapitools/client/model/InterestShareTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/InterestTransaction.java b/src/main/java/org/openapitools/client/model/InterestTransaction.java index 5f512751..3c98608b 100644 --- a/src/main/java/org/openapitools/client/model/InterestTransaction.java +++ b/src/main/java/org/openapitools/client/model/InterestTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Limits.java b/src/main/java/org/openapitools/client/model/Limits.java index a1546e8b..51f68414 100644 --- a/src/main/java/org/openapitools/client/model/Limits.java +++ b/src/main/java/org/openapitools/client/model/Limits.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Limits1.java b/src/main/java/org/openapitools/client/model/Limits1.java index 966d6fa6..3c8fa685 100644 --- a/src/main/java/org/openapitools/client/model/Limits1.java +++ b/src/main/java/org/openapitools/client/model/Limits1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/LimitsAttributes.java b/src/main/java/org/openapitools/client/model/LimitsAttributes.java index c6495f9a..7a21fc06 100644 --- a/src/main/java/org/openapitools/client/model/LimitsAttributes.java +++ b/src/main/java/org/openapitools/client/model/LimitsAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/LimitsAttributesCard.java b/src/main/java/org/openapitools/client/model/LimitsAttributesCard.java index 5346753d..eb6cf3f8 100644 --- a/src/main/java/org/openapitools/client/model/LimitsAttributesCard.java +++ b/src/main/java/org/openapitools/client/model/LimitsAttributesCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/LimitsAttributesCardLimits.java b/src/main/java/org/openapitools/client/model/LimitsAttributesCardLimits.java index 403c1f95..d42cbf61 100644 --- a/src/main/java/org/openapitools/client/model/LimitsAttributesCardLimits.java +++ b/src/main/java/org/openapitools/client/model/LimitsAttributesCardLimits.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/LimitsAttributesCardTotalsDaily.java b/src/main/java/org/openapitools/client/model/LimitsAttributesCardTotalsDaily.java index 22d89add..62e1ed24 100644 --- a/src/main/java/org/openapitools/client/model/LimitsAttributesCardTotalsDaily.java +++ b/src/main/java/org/openapitools/client/model/LimitsAttributesCardTotalsDaily.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ListPageParametersObject.java b/src/main/java/org/openapitools/client/model/ListPageParametersObject.java index 6a93236e..a30205fa 100644 --- a/src/main/java/org/openapitools/client/model/ListPageParametersObject.java +++ b/src/main/java/org/openapitools/client/model/ListPageParametersObject.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -230,11 +230,11 @@ public String toJson() { public List toParams() { List params = new ArrayList<>(); - if(this.offset != null){ + if (this.offset != null) { params.add(new Pair("page[offset]", this.offset.toString())); } - if(this.limit != null){ + if (this.limit != null) { params.add(new Pair("page[limit]", this.limit.toString())); } diff --git a/src/main/java/org/openapitools/client/model/Merchant.java b/src/main/java/org/openapitools/client/model/Merchant.java index 5cb63db6..4d3afd79 100644 --- a/src/main/java/org/openapitools/client/model/Merchant.java +++ b/src/main/java/org/openapitools/client/model/Merchant.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/MonthlySchedule.java b/src/main/java/org/openapitools/client/model/MonthlySchedule.java new file mode 100644 index 00000000..735445d4 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/MonthlySchedule.java @@ -0,0 +1,467 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * MonthlySchedule + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MonthlySchedule { + public static final String SERIALIZED_NAME_START_TIME = "startTime"; + @SerializedName(SERIALIZED_NAME_START_TIME) + private LocalDate startTime; + + public static final String SERIALIZED_NAME_END_TIME = "endTime"; + @SerializedName(SERIALIZED_NAME_END_TIME) + private LocalDate endTime; + + public static final String SERIALIZED_NAME_DAY_OF_MONTH = "dayOfMonth"; + @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) + private Integer dayOfMonth; + + /** + * Gets or Sets dayOfWeek + */ + @JsonAdapter(DayOfWeekEnum.Adapter.class) + public enum DayOfWeekEnum { + SUNDAY("Sunday"), + + MONDAY("Monday"), + + TUESDAY("Tuesday"), + + WEDNESDAY("Wednesday"), + + THURSDAY("Thursday"), + + FRIDAY("Friday"), + + SATURDAY("Saturday"); + + private String value; + + DayOfWeekEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DayOfWeekEnum fromValue(String value) { + for (DayOfWeekEnum b : DayOfWeekEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DayOfWeekEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DayOfWeekEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DayOfWeekEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_DAY_OF_WEEK = "dayOfWeek"; + @SerializedName(SERIALIZED_NAME_DAY_OF_WEEK) + private DayOfWeekEnum dayOfWeek; + + /** + * Gets or Sets interval + */ + @JsonAdapter(IntervalEnum.Adapter.class) + public enum IntervalEnum { + MONTHLY("Monthly"), + + WEEKLY("Weekly"); + + private String value; + + IntervalEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IntervalEnum fromValue(String value) { + for (IntervalEnum b : IntervalEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IntervalEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IntervalEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IntervalEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + @SerializedName(SERIALIZED_NAME_INTERVAL) + private IntervalEnum interval; + + public static final String SERIALIZED_NAME_TOTAL_NUMBER_OF_PAYMENTS = "totalNumberOfPayments"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUMBER_OF_PAYMENTS) + private Integer totalNumberOfPayments; + + public MonthlySchedule() { + } + + public MonthlySchedule startTime(LocalDate startTime) { + + this.startTime = startTime; + return this; + } + + /** + * Get startTime + * @return startTime + **/ + @javax.annotation.Nullable + public LocalDate getStartTime() { + return startTime; + } + + + public void setStartTime(LocalDate startTime) { + this.startTime = startTime; + } + + + public MonthlySchedule endTime(LocalDate endTime) { + + this.endTime = endTime; + return this; + } + + /** + * Get endTime + * @return endTime + **/ + @javax.annotation.Nullable + public LocalDate getEndTime() { + return endTime; + } + + + public void setEndTime(LocalDate endTime) { + this.endTime = endTime; + } + + + public MonthlySchedule dayOfMonth(Integer dayOfMonth) { + + this.dayOfMonth = dayOfMonth; + return this; + } + + /** + * Get dayOfMonth + * minimum: -5 + * maximum: 28 + * @return dayOfMonth + **/ + @javax.annotation.Nullable + public Integer getDayOfMonth() { + return dayOfMonth; + } + + + public void setDayOfMonth(Integer dayOfMonth) { + this.dayOfMonth = dayOfMonth; + } + + + public MonthlySchedule dayOfWeek(DayOfWeekEnum dayOfWeek) { + + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Get dayOfWeek + * @return dayOfWeek + **/ + @javax.annotation.Nullable + public DayOfWeekEnum getDayOfWeek() { + return dayOfWeek; + } + + + public void setDayOfWeek(DayOfWeekEnum dayOfWeek) { + this.dayOfWeek = dayOfWeek; + } + + + public MonthlySchedule interval(IntervalEnum interval) { + + this.interval = interval; + return this; + } + + /** + * Get interval + * @return interval + **/ + @javax.annotation.Nonnull + public IntervalEnum getInterval() { + return interval; + } + + + public void setInterval(IntervalEnum interval) { + this.interval = interval; + } + + + public MonthlySchedule totalNumberOfPayments(Integer totalNumberOfPayments) { + + this.totalNumberOfPayments = totalNumberOfPayments; + return this; + } + + /** + * Get totalNumberOfPayments + * minimum: 1 + * @return totalNumberOfPayments + **/ + @javax.annotation.Nullable + public Integer getTotalNumberOfPayments() { + return totalNumberOfPayments; + } + + + public void setTotalNumberOfPayments(Integer totalNumberOfPayments) { + this.totalNumberOfPayments = totalNumberOfPayments; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonthlySchedule monthlySchedule = (MonthlySchedule) o; + return Objects.equals(this.startTime, monthlySchedule.startTime) && + Objects.equals(this.endTime, monthlySchedule.endTime) && + Objects.equals(this.dayOfMonth, monthlySchedule.dayOfMonth) && + Objects.equals(this.dayOfWeek, monthlySchedule.dayOfWeek) && + Objects.equals(this.interval, monthlySchedule.interval) && + Objects.equals(this.totalNumberOfPayments, monthlySchedule.totalNumberOfPayments); + } + + @Override + public int hashCode() { + return Objects.hash(startTime, endTime, dayOfMonth, dayOfWeek, interval, totalNumberOfPayments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonthlySchedule {\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); + sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" totalNumberOfPayments: ").append(toIndentedString(totalNumberOfPayments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + openapiFields.add("dayOfMonth"); + openapiFields.add("dayOfWeek"); + openapiFields.add("interval"); + openapiFields.add("totalNumberOfPayments"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("interval"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MonthlySchedule + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MonthlySchedule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MonthlySchedule is not found in the empty JSON string", MonthlySchedule.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MonthlySchedule.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MonthlySchedule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MonthlySchedule.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("dayOfWeek") != null && !jsonObj.get("dayOfWeek").isJsonNull()) && !jsonObj.get("dayOfWeek").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dayOfWeek` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dayOfWeek").toString())); + } + if (!jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `interval` to be a primitive type in the JSON string but got `%s`", jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MonthlySchedule.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MonthlySchedule' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MonthlySchedule.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MonthlySchedule value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MonthlySchedule read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MonthlySchedule given an JSON string + * + * @param jsonString JSON string + * @return An instance of MonthlySchedule + * @throws IOException if the JSON string is invalid with respect to MonthlySchedule + */ + public static MonthlySchedule fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MonthlySchedule.class); + } + + /** + * Convert an instance of MonthlySchedule to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/NegativeBalanceCoverageTransaction.java b/src/main/java/org/openapitools/client/model/NegativeBalanceCoverageTransaction.java index 2db6d498..4bab0551 100644 --- a/src/main/java/org/openapitools/client/model/NegativeBalanceCoverageTransaction.java +++ b/src/main/java/org/openapitools/client/model/NegativeBalanceCoverageTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Occupation.java b/src/main/java/org/openapitools/client/model/Occupation.java index a1694760..57420584 100644 --- a/src/main/java/org/openapitools/client/model/Occupation.java +++ b/src/main/java/org/openapitools/client/model/Occupation.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Officer.java b/src/main/java/org/openapitools/client/model/Officer.java index 547c5fed..2a177e90 100644 --- a/src/main/java/org/openapitools/client/model/Officer.java +++ b/src/main/java/org/openapitools/client/model/Officer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,8 +21,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.LocalDate; +import java.util.ArrayList; import java.util.Arrays; -import org.openapitools.client.model.Address; +import java.util.List; import org.openapitools.client.model.AnnualIncome; import org.openapitools.client.model.FullName; import org.openapitools.client.model.Occupation; @@ -58,10 +59,22 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Officer { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; @SerializedName(SERIALIZED_NAME_FULL_NAME) private FullName fullName; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_PHONE = "phone"; + @SerializedName(SERIALIZED_NAME_PHONE) + private Phone phone; + public static final String SERIALIZED_NAME_SSN = "ssn"; @SerializedName(SERIALIZED_NAME_SSN) private String ssn; @@ -80,19 +93,110 @@ public class Officer { public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; + private Object address; public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) private LocalDate dateOfBirth; - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; + public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; + @SerializedName(SERIALIZED_NAME_EVALUATION_ID) + private String evaluationId; - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + /** + * Gets or Sets title + */ + @JsonAdapter(TitleEnum.Adapter.class) + public enum TitleEnum { + PRESIDENT("President"), + + CEO("CEO"), + + COO("COO"), + + CFO("CFO"), + + BENEFITSADMINISTRATIONOFFICER("BenefitsAdministrationOfficer"), + + CIO("CIO"), + + VP("VP"), + + AVP("AVP"), + + TREASURER("Treasurer"), + + SECRETARY("Secretary"), + + CONTROLLER("Controller"), + + MANAGER("Manager"), + + PARTNER("Partner"), + + MEMBER("Member"); + + private String value; + + TitleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TitleEnum fromValue(String value) { + for (TitleEnum b : TitleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TitleEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TitleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TitleEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TITLE = "title"; + @SerializedName(SERIALIZED_NAME_TITLE) + private TitleEnum title; + + public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; + @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) + private List evaluationFlags; + + public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; + @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) + private String maskedSSN; + + public static final String SERIALIZED_NAME_MASKED_PASSPORT = "maskedPassport"; + @SerializedName(SERIALIZED_NAME_MASKED_PASSPORT) + private String maskedPassport; + + public static final String SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; + @SerializedName(SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR) + private String maskedMatriculaConsular; + + public static final String SERIALIZED_NAME_ID_THEFT_SCORE = "idTheftScore"; + @SerializedName(SERIALIZED_NAME_ID_THEFT_SCORE) + private Integer idTheftScore; public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; @SerializedName(SERIALIZED_NAME_OCCUPATION) @@ -109,6 +213,27 @@ public class Officer { public Officer() { } + public Officer status(String status) { + + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + public Officer fullName(FullName fullName) { this.fullName = fullName; @@ -130,6 +255,48 @@ public void setFullName(FullName fullName) { } + public Officer email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + public Officer phone(Phone phone) { + + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @javax.annotation.Nullable + public Phone getPhone() { + return phone; + } + + + public void setPhone(Phone phone) { + this.phone = phone; + } + + public Officer ssn(String ssn) { this.ssn = ssn; @@ -214,7 +381,7 @@ public void setMatriculaConsular(String matriculaConsular) { } - public Officer address(Address address) { + public Officer address(Object address) { this.address = address; return this; @@ -225,12 +392,12 @@ public Officer address(Address address) { * @return address **/ @javax.annotation.Nullable - public Address getAddress() { + public Object getAddress() { return address; } - public void setAddress(Address address) { + public void setAddress(Object address) { this.address = address; } @@ -256,45 +423,158 @@ public void setDateOfBirth(LocalDate dateOfBirth) { } - public Officer phone(Phone phone) { + public Officer evaluationId(String evaluationId) { - this.phone = phone; + this.evaluationId = evaluationId; return this; } /** - * Get phone - * @return phone + * Get evaluationId + * @return evaluationId **/ @javax.annotation.Nullable - public Phone getPhone() { - return phone; + public String getEvaluationId() { + return evaluationId; } - public void setPhone(Phone phone) { - this.phone = phone; + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; } - public Officer email(String email) { + public Officer title(TitleEnum title) { - this.email = email; + this.title = title; return this; } /** - * Get email - * @return email + * Get title + * @return title **/ @javax.annotation.Nullable - public String getEmail() { - return email; + public TitleEnum getTitle() { + return title; } - public void setEmail(String email) { - this.email = email; + public void setTitle(TitleEnum title) { + this.title = title; + } + + + public Officer evaluationFlags(List evaluationFlags) { + + this.evaluationFlags = evaluationFlags; + return this; + } + + public Officer addEvaluationFlagsItem(String evaluationFlagsItem) { + if (this.evaluationFlags == null) { + this.evaluationFlags = new ArrayList<>(); + } + this.evaluationFlags.add(evaluationFlagsItem); + return this; + } + + /** + * Get evaluationFlags + * @return evaluationFlags + **/ + @javax.annotation.Nullable + public List getEvaluationFlags() { + return evaluationFlags; + } + + + public void setEvaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + } + + + public Officer maskedSSN(String maskedSSN) { + + this.maskedSSN = maskedSSN; + return this; + } + + /** + * Get maskedSSN + * @return maskedSSN + **/ + @javax.annotation.Nullable + public String getMaskedSSN() { + return maskedSSN; + } + + + public void setMaskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + } + + + public Officer maskedPassport(String maskedPassport) { + + this.maskedPassport = maskedPassport; + return this; + } + + /** + * Get maskedPassport + * @return maskedPassport + **/ + @javax.annotation.Nullable + public String getMaskedPassport() { + return maskedPassport; + } + + + public void setMaskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + } + + + public Officer maskedMatriculaConsular(String maskedMatriculaConsular) { + + this.maskedMatriculaConsular = maskedMatriculaConsular; + return this; + } + + /** + * Get maskedMatriculaConsular + * @return maskedMatriculaConsular + **/ + @javax.annotation.Nullable + public String getMaskedMatriculaConsular() { + return maskedMatriculaConsular; + } + + + public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + } + + + public Officer idTheftScore(Integer idTheftScore) { + + this.idTheftScore = idTheftScore; + return this; + } + + /** + * Get idTheftScore + * @return idTheftScore + **/ + @javax.annotation.Nullable + public Integer getIdTheftScore() { + return idTheftScore; + } + + + public void setIdTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; } @@ -371,15 +651,23 @@ public boolean equals(Object o) { return false; } Officer officer = (Officer) o; - return Objects.equals(this.fullName, officer.fullName) && + return Objects.equals(this.status, officer.status) && + Objects.equals(this.fullName, officer.fullName) && + Objects.equals(this.email, officer.email) && + Objects.equals(this.phone, officer.phone) && Objects.equals(this.ssn, officer.ssn) && Objects.equals(this.passport, officer.passport) && Objects.equals(this.nationality, officer.nationality) && Objects.equals(this.matriculaConsular, officer.matriculaConsular) && Objects.equals(this.address, officer.address) && Objects.equals(this.dateOfBirth, officer.dateOfBirth) && - Objects.equals(this.phone, officer.phone) && - Objects.equals(this.email, officer.email) && + Objects.equals(this.evaluationId, officer.evaluationId) && + Objects.equals(this.title, officer.title) && + Objects.equals(this.evaluationFlags, officer.evaluationFlags) && + Objects.equals(this.maskedSSN, officer.maskedSSN) && + Objects.equals(this.maskedPassport, officer.maskedPassport) && + Objects.equals(this.maskedMatriculaConsular, officer.maskedMatriculaConsular) && + Objects.equals(this.idTheftScore, officer.idTheftScore) && Objects.equals(this.occupation, officer.occupation) && Objects.equals(this.annualIncome, officer.annualIncome) && Objects.equals(this.sourceOfIncome, officer.sourceOfIncome); @@ -387,22 +675,30 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(fullName, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, phone, email, occupation, annualIncome, sourceOfIncome); + return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, title, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore, occupation, annualIncome, sourceOfIncome); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Officer {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); + sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); + sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); + sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); + sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); @@ -428,15 +724,23 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("status"); openapiFields.add("fullName"); + openapiFields.add("email"); + openapiFields.add("phone"); openapiFields.add("ssn"); openapiFields.add("passport"); openapiFields.add("nationality"); openapiFields.add("matriculaConsular"); openapiFields.add("address"); openapiFields.add("dateOfBirth"); - openapiFields.add("phone"); - openapiFields.add("email"); + openapiFields.add("evaluationId"); + openapiFields.add("title"); + openapiFields.add("evaluationFlags"); + openapiFields.add("maskedSSN"); + openapiFields.add("maskedPassport"); + openapiFields.add("maskedMatriculaConsular"); + openapiFields.add("idTheftScore"); openapiFields.add("occupation"); openapiFields.add("annualIncome"); openapiFields.add("sourceOfIncome"); @@ -466,10 +770,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } // validate the optional field `fullName` if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { FullName.validateJsonElement(jsonObj.get("fullName")); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + // validate the optional field `phone` + if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { + Phone.validateJsonElement(jsonObj.get("phone")); + } if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); } @@ -482,16 +796,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); + if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); + if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + // ensure the optional json data is an array if present + if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); + } + if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); + } + if ((jsonObj.get("maskedPassport") != null && !jsonObj.get("maskedPassport").isJsonNull()) && !jsonObj.get("maskedPassport").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `maskedPassport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedPassport").toString())); + } + if ((jsonObj.get("maskedMatriculaConsular") != null && !jsonObj.get("maskedMatriculaConsular").isJsonNull()) && !jsonObj.get("maskedMatriculaConsular").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `maskedMatriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedMatriculaConsular").toString())); } } diff --git a/src/main/java/org/openapitools/client/model/Officer1.java b/src/main/java/org/openapitools/client/model/Officer1.java deleted file mode 100644 index 9c5fae84..00000000 --- a/src/main/java/org/openapitools/client/model/Officer1.java +++ /dev/null @@ -1,869 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.SourceOfIncome; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Officer1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Officer1 { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Object address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - /** - * Gets or Sets title - */ - @JsonAdapter(TitleEnum.Adapter.class) - public enum TitleEnum { - PRESIDENT("President"), - - CEO("CEO"), - - COO("COO"), - - CFO("CFO"), - - BENEFITSADMINISTRATIONOFFICER("BenefitsAdministrationOfficer"), - - CIO("CIO"), - - VP("VP"), - - AVP("AVP"), - - TREASURER("Treasurer"), - - SECRETARY("Secretary"), - - CONTROLLER("Controller"), - - MANAGER("Manager"), - - PARTNER("Partner"), - - MEMBER("Member"); - - private String value; - - TitleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TitleEnum fromValue(String value) { - for (TitleEnum b : TitleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TitleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TitleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TitleEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private TitleEnum title; - - public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; - @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) - private List evaluationFlags; - - public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; - @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) - private String maskedSSN; - - public static final String SERIALIZED_NAME_MASKED_PASSPORT = "maskedPassport"; - @SerializedName(SERIALIZED_NAME_MASKED_PASSPORT) - private String maskedPassport; - - public static final String SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; - @SerializedName(SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR) - private String maskedMatriculaConsular; - - public static final String SERIALIZED_NAME_ID_THEFT_SCORE = "idTheftScore"; - @SerializedName(SERIALIZED_NAME_ID_THEFT_SCORE) - private Integer idTheftScore; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public Officer1() { - } - - public Officer1 status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public Officer1 fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public Officer1 email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public Officer1 phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public Officer1 ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public Officer1 passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public Officer1 nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public Officer1 matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public Officer1 address(Object address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Object getAddress() { - return address; - } - - - public void setAddress(Object address) { - this.address = address; - } - - - public Officer1 dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public Officer1 evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public Officer1 title(TitleEnum title) { - - this.title = title; - return this; - } - - /** - * Get title - * @return title - **/ - @javax.annotation.Nullable - public TitleEnum getTitle() { - return title; - } - - - public void setTitle(TitleEnum title) { - this.title = title; - } - - - public Officer1 evaluationFlags(List evaluationFlags) { - - this.evaluationFlags = evaluationFlags; - return this; - } - - public Officer1 addEvaluationFlagsItem(String evaluationFlagsItem) { - if (this.evaluationFlags == null) { - this.evaluationFlags = new ArrayList<>(); - } - this.evaluationFlags.add(evaluationFlagsItem); - return this; - } - - /** - * Get evaluationFlags - * @return evaluationFlags - **/ - @javax.annotation.Nullable - public List getEvaluationFlags() { - return evaluationFlags; - } - - - public void setEvaluationFlags(List evaluationFlags) { - this.evaluationFlags = evaluationFlags; - } - - - public Officer1 maskedSSN(String maskedSSN) { - - this.maskedSSN = maskedSSN; - return this; - } - - /** - * Get maskedSSN - * @return maskedSSN - **/ - @javax.annotation.Nullable - public String getMaskedSSN() { - return maskedSSN; - } - - - public void setMaskedSSN(String maskedSSN) { - this.maskedSSN = maskedSSN; - } - - - public Officer1 maskedPassport(String maskedPassport) { - - this.maskedPassport = maskedPassport; - return this; - } - - /** - * Get maskedPassport - * @return maskedPassport - **/ - @javax.annotation.Nullable - public String getMaskedPassport() { - return maskedPassport; - } - - - public void setMaskedPassport(String maskedPassport) { - this.maskedPassport = maskedPassport; - } - - - public Officer1 maskedMatriculaConsular(String maskedMatriculaConsular) { - - this.maskedMatriculaConsular = maskedMatriculaConsular; - return this; - } - - /** - * Get maskedMatriculaConsular - * @return maskedMatriculaConsular - **/ - @javax.annotation.Nullable - public String getMaskedMatriculaConsular() { - return maskedMatriculaConsular; - } - - - public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { - this.maskedMatriculaConsular = maskedMatriculaConsular; - } - - - public Officer1 idTheftScore(Integer idTheftScore) { - - this.idTheftScore = idTheftScore; - return this; - } - - /** - * Get idTheftScore - * @return idTheftScore - **/ - @javax.annotation.Nullable - public Integer getIdTheftScore() { - return idTheftScore; - } - - - public void setIdTheftScore(Integer idTheftScore) { - this.idTheftScore = idTheftScore; - } - - - public Officer1 occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public Officer1 annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public Officer1 sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Officer1 officer1 = (Officer1) o; - return Objects.equals(this.status, officer1.status) && - Objects.equals(this.fullName, officer1.fullName) && - Objects.equals(this.email, officer1.email) && - Objects.equals(this.phone, officer1.phone) && - Objects.equals(this.ssn, officer1.ssn) && - Objects.equals(this.passport, officer1.passport) && - Objects.equals(this.nationality, officer1.nationality) && - Objects.equals(this.matriculaConsular, officer1.matriculaConsular) && - Objects.equals(this.address, officer1.address) && - Objects.equals(this.dateOfBirth, officer1.dateOfBirth) && - Objects.equals(this.evaluationId, officer1.evaluationId) && - Objects.equals(this.title, officer1.title) && - Objects.equals(this.evaluationFlags, officer1.evaluationFlags) && - Objects.equals(this.maskedSSN, officer1.maskedSSN) && - Objects.equals(this.maskedPassport, officer1.maskedPassport) && - Objects.equals(this.maskedMatriculaConsular, officer1.maskedMatriculaConsular) && - Objects.equals(this.idTheftScore, officer1.idTheftScore) && - Objects.equals(this.occupation, officer1.occupation) && - Objects.equals(this.annualIncome, officer1.annualIncome) && - Objects.equals(this.sourceOfIncome, officer1.sourceOfIncome); - } - - @Override - public int hashCode() { - return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, title, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore, occupation, annualIncome, sourceOfIncome); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Officer1 {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); - sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); - sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); - sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); - sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("evaluationId"); - openapiFields.add("title"); - openapiFields.add("evaluationFlags"); - openapiFields.add("maskedSSN"); - openapiFields.add("maskedPassport"); - openapiFields.add("maskedMatriculaConsular"); - openapiFields.add("idTheftScore"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Officer1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Officer1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Officer1 is not found in the empty JSON string", Officer1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Officer1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Officer1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // validate the optional field `fullName` - if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { - FullName.validateJsonElement(jsonObj.get("fullName")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); - } - if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); - } - if ((jsonObj.get("maskedPassport") != null && !jsonObj.get("maskedPassport").isJsonNull()) && !jsonObj.get("maskedPassport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedPassport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedPassport").toString())); - } - if ((jsonObj.get("maskedMatriculaConsular") != null && !jsonObj.get("maskedMatriculaConsular").isJsonNull()) && !jsonObj.get("maskedMatriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedMatriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedMatriculaConsular").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Officer1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Officer1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Officer1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Officer1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Officer1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Officer1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of Officer1 - * @throws IOException if the JSON string is invalid with respect to Officer1 - */ - public static Officer1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Officer1.class); - } - - /** - * Convert an instance of Officer1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/OrgRelationship.java b/src/main/java/org/openapitools/client/model/OrgRelationship.java index 7e0f3343..f469c51a 100644 --- a/src/main/java/org/openapitools/client/model/OrgRelationship.java +++ b/src/main/java/org/openapitools/client/model/OrgRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/OrgRelationshipData.java b/src/main/java/org/openapitools/client/model/OrgRelationshipData.java index ab679174..f05ea8bb 100644 --- a/src/main/java/org/openapitools/client/model/OrgRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/OrgRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/OriginatedAchTransaction.java b/src/main/java/org/openapitools/client/model/OriginatedAchTransaction.java index eb02658d..88b8d412 100644 --- a/src/main/java/org/openapitools/client/model/OriginatedAchTransaction.java +++ b/src/main/java/org/openapitools/client/model/OriginatedAchTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/OriginatedAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/OriginatedAchTransactionAllOfAttributes.java index 56946d8b..9c9256eb 100644 --- a/src/main/java/org/openapitools/client/model/OriginatedAchTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/OriginatedAchTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PaginationMeta.java b/src/main/java/org/openapitools/client/model/PaginationMeta.java index 2f9ab9e4..683da810 100644 --- a/src/main/java/org/openapitools/client/model/PaginationMeta.java +++ b/src/main/java/org/openapitools/client/model/PaginationMeta.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PaginationMetaPagination.java b/src/main/java/org/openapitools/client/model/PaginationMetaPagination.java index 90415f20..527b3d48 100644 --- a/src/main/java/org/openapitools/client/model/PaginationMetaPagination.java +++ b/src/main/java/org/openapitools/client/model/PaginationMetaPagination.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchAccount.java b/src/main/java/org/openapitools/client/model/PatchAccount.java index a7a2a85a..110de4bb 100644 --- a/src/main/java/org/openapitools/client/model/PatchAccount.java +++ b/src/main/java/org/openapitools/client/model/PatchAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchAccountData.java b/src/main/java/org/openapitools/client/model/PatchAccountData.java index 88624051..4f80ddb8 100644 --- a/src/main/java/org/openapitools/client/model/PatchAccountData.java +++ b/src/main/java/org/openapitools/client/model/PatchAccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchAchPayment.java b/src/main/java/org/openapitools/client/model/PatchAchPayment.java index eddb0533..e1c564bd 100644 --- a/src/main/java/org/openapitools/client/model/PatchAchPayment.java +++ b/src/main/java/org/openapitools/client/model/PatchAchPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchAchReceivedPayment.java b/src/main/java/org/openapitools/client/model/PatchAchReceivedPayment.java index f01d9539..dbf06744 100644 --- a/src/main/java/org/openapitools/client/model/PatchAchReceivedPayment.java +++ b/src/main/java/org/openapitools/client/model/PatchAchReceivedPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBookPayment.java b/src/main/java/org/openapitools/client/model/PatchBookPayment.java index 82ec56bf..ecd4a9a9 100644 --- a/src/main/java/org/openapitools/client/model/PatchBookPayment.java +++ b/src/main/java/org/openapitools/client/model/PatchBookPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBookTransaction.java b/src/main/java/org/openapitools/client/model/PatchBookTransaction.java index d2eb43cd..8c77ae17 100644 --- a/src/main/java/org/openapitools/client/model/PatchBookTransaction.java +++ b/src/main/java/org/openapitools/client/model/PatchBookTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBookTransactionAttributes.java b/src/main/java/org/openapitools/client/model/PatchBookTransactionAttributes.java index 3262d58a..f8024ce7 100644 --- a/src/main/java/org/openapitools/client/model/PatchBookTransactionAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchBookTransactionAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBookTransactionRelationships.java b/src/main/java/org/openapitools/client/model/PatchBookTransactionRelationships.java index c7c432c4..1856c62a 100644 --- a/src/main/java/org/openapitools/client/model/PatchBookTransactionRelationships.java +++ b/src/main/java/org/openapitools/client/model/PatchBookTransactionRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplication.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplication.java index 65559fb0..18e4214c 100644 --- a/src/main/java/org/openapitools/client/model/PatchBusinessApplication.java +++ b/src/main/java/org/openapitools/client/model/PatchBusinessApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationAttributes.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationAttributes.java index f2ed7a73..b2d07c6f 100644 --- a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,12 +23,10 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.client.model.BeneficialOwner; import org.openapitools.client.model.BusinessAnnualRevenue; import org.openapitools.client.model.BusinessNumberOfEmployees; import org.openapitools.client.model.BusinessVertical; import org.openapitools.client.model.CashFlow; -import org.openapitools.client.model.Officer; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -59,14 +57,6 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class PatchBusinessApplicationAttributes { - public static final String SERIALIZED_NAME_OFFICER = "officer"; - @SerializedName(SERIALIZED_NAME_OFFICER) - private Officer officer; - - public static final String SERIALIZED_NAME_BENEFICIAL_OWNERS = "beneficialOwners"; - @SerializedName(SERIALIZED_NAME_BENEFICIAL_OWNERS) - private List beneficialOwners; - public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) private Object tags; @@ -95,6 +85,10 @@ public class PatchBusinessApplicationAttributes { @SerializedName(SERIALIZED_NAME_STOCK_SYMBOL) private String stockSymbol; + public static final String SERIALIZED_NAME_WEBSITE = "website"; + @SerializedName(SERIALIZED_NAME_WEBSITE) + private String website; + public static final String SERIALIZED_NAME_BUSINESS_VERTICAL = "businessVertical"; @SerializedName(SERIALIZED_NAME_BUSINESS_VERTICAL) private BusinessVertical businessVertical; @@ -102,56 +96,6 @@ public class PatchBusinessApplicationAttributes { public PatchBusinessApplicationAttributes() { } - public PatchBusinessApplicationAttributes officer(Officer officer) { - - this.officer = officer; - return this; - } - - /** - * Get officer - * @return officer - **/ - @javax.annotation.Nullable - public Officer getOfficer() { - return officer; - } - - - public void setOfficer(Officer officer) { - this.officer = officer; - } - - - public PatchBusinessApplicationAttributes beneficialOwners(List beneficialOwners) { - - this.beneficialOwners = beneficialOwners; - return this; - } - - public PatchBusinessApplicationAttributes addBeneficialOwnersItem(BeneficialOwner beneficialOwnersItem) { - if (this.beneficialOwners == null) { - this.beneficialOwners = new ArrayList<>(); - } - this.beneficialOwners.add(beneficialOwnersItem); - return this; - } - - /** - * Get beneficialOwners - * @return beneficialOwners - **/ - @javax.annotation.Nullable - public List getBeneficialOwners() { - return beneficialOwners; - } - - - public void setBeneficialOwners(List beneficialOwners) { - this.beneficialOwners = beneficialOwners; - } - - public PatchBusinessApplicationAttributes tags(Object tags) { this.tags = tags; @@ -307,6 +251,27 @@ public void setStockSymbol(String stockSymbol) { } + public PatchBusinessApplicationAttributes website(String website) { + + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @javax.annotation.Nullable + public String getWebsite() { + return website; + } + + + public void setWebsite(String website) { + this.website = website; + } + + public PatchBusinessApplicationAttributes businessVertical(BusinessVertical businessVertical) { this.businessVertical = businessVertical; @@ -338,29 +303,26 @@ public boolean equals(Object o) { return false; } PatchBusinessApplicationAttributes patchBusinessApplicationAttributes = (PatchBusinessApplicationAttributes) o; - return Objects.equals(this.officer, patchBusinessApplicationAttributes.officer) && - Objects.equals(this.beneficialOwners, patchBusinessApplicationAttributes.beneficialOwners) && - Objects.equals(this.tags, patchBusinessApplicationAttributes.tags) && + return Objects.equals(this.tags, patchBusinessApplicationAttributes.tags) && Objects.equals(this.annualRevenue, patchBusinessApplicationAttributes.annualRevenue) && Objects.equals(this.numberOfEmployees, patchBusinessApplicationAttributes.numberOfEmployees) && Objects.equals(this.cashFlow, patchBusinessApplicationAttributes.cashFlow) && Objects.equals(this.yearOfIncorporation, patchBusinessApplicationAttributes.yearOfIncorporation) && Objects.equals(this.countriesOfOperation, patchBusinessApplicationAttributes.countriesOfOperation) && Objects.equals(this.stockSymbol, patchBusinessApplicationAttributes.stockSymbol) && + Objects.equals(this.website, patchBusinessApplicationAttributes.website) && Objects.equals(this.businessVertical, patchBusinessApplicationAttributes.businessVertical); } @Override public int hashCode() { - return Objects.hash(officer, beneficialOwners, tags, annualRevenue, numberOfEmployees, cashFlow, yearOfIncorporation, countriesOfOperation, stockSymbol, businessVertical); + return Objects.hash(tags, annualRevenue, numberOfEmployees, cashFlow, yearOfIncorporation, countriesOfOperation, stockSymbol, website, businessVertical); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PatchBusinessApplicationAttributes {\n"); - sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); - sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); @@ -368,6 +330,7 @@ public String toString() { sb.append(" yearOfIncorporation: ").append(toIndentedString(yearOfIncorporation)).append("\n"); sb.append(" countriesOfOperation: ").append(toIndentedString(countriesOfOperation)).append("\n"); sb.append(" stockSymbol: ").append(toIndentedString(stockSymbol)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); sb.append("}"); return sb.toString(); @@ -391,8 +354,6 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("officer"); - openapiFields.add("beneficialOwners"); openapiFields.add("tags"); openapiFields.add("annualRevenue"); openapiFields.add("numberOfEmployees"); @@ -400,6 +361,7 @@ private String toIndentedString(Object o) { openapiFields.add("yearOfIncorporation"); openapiFields.add("countriesOfOperation"); openapiFields.add("stockSymbol"); + openapiFields.add("website"); openapiFields.add("businessVertical"); // a set of required properties/fields (JSON key names) @@ -427,24 +389,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `officer` - if (jsonObj.get("officer") != null && !jsonObj.get("officer").isJsonNull()) { - Officer.validateJsonElement(jsonObj.get("officer")); - } - if (jsonObj.get("beneficialOwners") != null && !jsonObj.get("beneficialOwners").isJsonNull()) { - JsonArray jsonArraybeneficialOwners = jsonObj.getAsJsonArray("beneficialOwners"); - if (jsonArraybeneficialOwners != null) { - // ensure the json data is an array - if (!jsonObj.get("beneficialOwners").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `beneficialOwners` to be an array in the JSON string but got `%s`", jsonObj.get("beneficialOwners").toString())); - } - - // validate the optional field `beneficialOwners` (array) - for (int i = 0; i < jsonArraybeneficialOwners.size(); i++) { - BeneficialOwner.validateJsonElement(jsonArraybeneficialOwners.get(i)); - }; - } - } if ((jsonObj.get("yearOfIncorporation") != null && !jsonObj.get("yearOfIncorporation").isJsonNull()) && !jsonObj.get("yearOfIncorporation").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `yearOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("yearOfIncorporation").toString())); } @@ -455,6 +399,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("stockSymbol") != null && !jsonObj.get("stockSymbol").isJsonNull()) && !jsonObj.get("stockSymbol").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `stockSymbol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stockSymbol").toString())); } + if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwner.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwner.java new file mode 100644 index 00000000..2c51f5e7 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwner.java @@ -0,0 +1,248 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.PatchBusinessApplicationBeneficialOwnerAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * PatchBusinessApplicationBeneficialOwner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationBeneficialOwner { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "beneficialOwner"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private PatchBusinessApplicationBeneficialOwnerAttributes attributes; + + public PatchBusinessApplicationBeneficialOwner() { + } + + public PatchBusinessApplicationBeneficialOwner type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public PatchBusinessApplicationBeneficialOwner attributes(PatchBusinessApplicationBeneficialOwnerAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nonnull + public PatchBusinessApplicationBeneficialOwnerAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(PatchBusinessApplicationBeneficialOwnerAttributes attributes) { + this.attributes = attributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationBeneficialOwner patchBusinessApplicationBeneficialOwner = (PatchBusinessApplicationBeneficialOwner) o; + return Objects.equals(this.type, patchBusinessApplicationBeneficialOwner.type) && + Objects.equals(this.attributes, patchBusinessApplicationBeneficialOwner.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationBeneficialOwner {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationBeneficialOwner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PatchBusinessApplicationBeneficialOwner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationBeneficialOwner is not found in the empty JSON string", PatchBusinessApplicationBeneficialOwner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PatchBusinessApplicationBeneficialOwner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationBeneficialOwner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PatchBusinessApplicationBeneficialOwner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `attributes` + PatchBusinessApplicationBeneficialOwnerAttributes.validateJsonElement(jsonObj.get("attributes")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PatchBusinessApplicationBeneficialOwner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchBusinessApplicationBeneficialOwner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationBeneficialOwner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PatchBusinessApplicationBeneficialOwner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PatchBusinessApplicationBeneficialOwner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PatchBusinessApplicationBeneficialOwner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PatchBusinessApplicationBeneficialOwner + * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationBeneficialOwner + */ + public static PatchBusinessApplicationBeneficialOwner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationBeneficialOwner.class); + } + + /** + * Convert an instance of PatchBusinessApplicationBeneficialOwner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwnerAttributes.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwnerAttributes.java new file mode 100644 index 00000000..028c2b08 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwnerAttributes.java @@ -0,0 +1,264 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.AnnualIncome; +import org.openapitools.client.model.Occupation; +import org.openapitools.client.model.SourceOfIncome; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * PatchBusinessApplicationBeneficialOwnerAttributes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationBeneficialOwnerAttributes { + public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; + @SerializedName(SERIALIZED_NAME_OCCUPATION) + private Occupation occupation; + + public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; + @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) + private AnnualIncome annualIncome; + + public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; + @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) + private SourceOfIncome sourceOfIncome; + + public PatchBusinessApplicationBeneficialOwnerAttributes() { + } + + public PatchBusinessApplicationBeneficialOwnerAttributes occupation(Occupation occupation) { + + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @javax.annotation.Nullable + public Occupation getOccupation() { + return occupation; + } + + + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public PatchBusinessApplicationBeneficialOwnerAttributes annualIncome(AnnualIncome annualIncome) { + + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @javax.annotation.Nullable + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public PatchBusinessApplicationBeneficialOwnerAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { + + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @javax.annotation.Nullable + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationBeneficialOwnerAttributes patchBusinessApplicationBeneficialOwnerAttributes = (PatchBusinessApplicationBeneficialOwnerAttributes) o; + return Objects.equals(this.occupation, patchBusinessApplicationBeneficialOwnerAttributes.occupation) && + Objects.equals(this.annualIncome, patchBusinessApplicationBeneficialOwnerAttributes.annualIncome) && + Objects.equals(this.sourceOfIncome, patchBusinessApplicationBeneficialOwnerAttributes.sourceOfIncome); + } + + @Override + public int hashCode() { + return Objects.hash(occupation, annualIncome, sourceOfIncome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationBeneficialOwnerAttributes {\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("occupation"); + openapiFields.add("annualIncome"); + openapiFields.add("sourceOfIncome"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationBeneficialOwnerAttributes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PatchBusinessApplicationBeneficialOwnerAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationBeneficialOwnerAttributes is not found in the empty JSON string", PatchBusinessApplicationBeneficialOwnerAttributes.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PatchBusinessApplicationBeneficialOwnerAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationBeneficialOwnerAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PatchBusinessApplicationBeneficialOwnerAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchBusinessApplicationBeneficialOwnerAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationBeneficialOwnerAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PatchBusinessApplicationBeneficialOwnerAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PatchBusinessApplicationBeneficialOwnerAttributes read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PatchBusinessApplicationBeneficialOwnerAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of PatchBusinessApplicationBeneficialOwnerAttributes + * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationBeneficialOwnerAttributes + */ + public static PatchBusinessApplicationBeneficialOwnerAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationBeneficialOwnerAttributes.class); + } + + /** + * Convert an instance of PatchBusinessApplicationBeneficialOwnerAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficer.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficer.java new file mode 100644 index 00000000..1a66cf64 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficer.java @@ -0,0 +1,248 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.PatchBusinessApplicationOfficerAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * PatchBusinessApplicationOfficer + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationOfficer { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "businessApplication"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private PatchBusinessApplicationOfficerAttributes attributes; + + public PatchBusinessApplicationOfficer() { + } + + public PatchBusinessApplicationOfficer type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public PatchBusinessApplicationOfficer attributes(PatchBusinessApplicationOfficerAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nonnull + public PatchBusinessApplicationOfficerAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(PatchBusinessApplicationOfficerAttributes attributes) { + this.attributes = attributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationOfficer patchBusinessApplicationOfficer = (PatchBusinessApplicationOfficer) o; + return Objects.equals(this.type, patchBusinessApplicationOfficer.type) && + Objects.equals(this.attributes, patchBusinessApplicationOfficer.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationOfficer {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationOfficer + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PatchBusinessApplicationOfficer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationOfficer is not found in the empty JSON string", PatchBusinessApplicationOfficer.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PatchBusinessApplicationOfficer.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationOfficer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PatchBusinessApplicationOfficer.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `attributes` + PatchBusinessApplicationOfficerAttributes.validateJsonElement(jsonObj.get("attributes")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PatchBusinessApplicationOfficer.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchBusinessApplicationOfficer' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationOfficer.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PatchBusinessApplicationOfficer value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PatchBusinessApplicationOfficer read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PatchBusinessApplicationOfficer given an JSON string + * + * @param jsonString JSON string + * @return An instance of PatchBusinessApplicationOfficer + * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationOfficer + */ + public static PatchBusinessApplicationOfficer fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationOfficer.class); + } + + /** + * Convert an instance of PatchBusinessApplicationOfficer to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest1.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributes.java similarity index 56% rename from src/main/java/org/openapitools/client/model/ExecuteRequest1.java rename to src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributes.java index 51e01e2c..0bef894f 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest1.java +++ b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.CreateApplicationForm; +import org.openapitools.client.model.PatchBusinessApplicationOfficerAttributesOfficer; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,35 +48,35 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest1 + * PatchBusinessApplicationOfficerAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest1 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateApplicationForm data; +public class PatchBusinessApplicationOfficerAttributes { + public static final String SERIALIZED_NAME_OFFICER = "officer"; + @SerializedName(SERIALIZED_NAME_OFFICER) + private PatchBusinessApplicationOfficerAttributesOfficer officer; - public ExecuteRequest1() { + public PatchBusinessApplicationOfficerAttributes() { } - public ExecuteRequest1 data(CreateApplicationForm data) { + public PatchBusinessApplicationOfficerAttributes officer(PatchBusinessApplicationOfficerAttributesOfficer officer) { - this.data = data; + this.officer = officer; return this; } /** - * Get data - * @return data + * Get officer + * @return officer **/ @javax.annotation.Nullable - public CreateApplicationForm getData() { - return data; + public PatchBusinessApplicationOfficerAttributesOfficer getOfficer() { + return officer; } - public void setData(CreateApplicationForm data) { - this.data = data; + public void setOfficer(PatchBusinessApplicationOfficerAttributesOfficer officer) { + this.officer = officer; } @@ -89,20 +89,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest1 executeRequest1 = (ExecuteRequest1) o; - return Objects.equals(this.data, executeRequest1.data); + PatchBusinessApplicationOfficerAttributes patchBusinessApplicationOfficerAttributes = (PatchBusinessApplicationOfficerAttributes) o; + return Objects.equals(this.officer, patchBusinessApplicationOfficerAttributes.officer); } @Override public int hashCode() { - return Objects.hash(data); + return Objects.hash(officer); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest1 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("class PatchBusinessApplicationOfficerAttributes {\n"); + sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); sb.append("}"); return sb.toString(); } @@ -125,7 +125,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("data"); + openapiFields.add("officer"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -135,26 +135,26 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest1 + * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationOfficerAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest1 is not found in the empty JSON string", ExecuteRequest1.openapiRequiredFields.toString())); + if (!PatchBusinessApplicationOfficerAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationOfficerAttributes is not found in the empty JSON string", PatchBusinessApplicationOfficerAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!PatchBusinessApplicationOfficerAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationOfficerAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateApplicationForm.validateJsonElement(jsonObj.get("data")); + // validate the optional field `officer` + if (jsonObj.get("officer") != null && !jsonObj.get("officer").isJsonNull()) { + PatchBusinessApplicationOfficerAttributesOfficer.validateJsonElement(jsonObj.get("officer")); } } @@ -162,22 +162,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest1' and its subtypes + if (!PatchBusinessApplicationOfficerAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchBusinessApplicationOfficerAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest1.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationOfficerAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest1 value) throws IOException { + public void write(JsonWriter out, PatchBusinessApplicationOfficerAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest1 read(JsonReader in) throws IOException { + public PatchBusinessApplicationOfficerAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -188,18 +188,18 @@ public ExecuteRequest1 read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest1 given an JSON string + * Create an instance of PatchBusinessApplicationOfficerAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest1 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest1 + * @return An instance of PatchBusinessApplicationOfficerAttributes + * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationOfficerAttributes */ - public static ExecuteRequest1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest1.class); + public static PatchBusinessApplicationOfficerAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationOfficerAttributes.class); } /** - * Convert an instance of ExecuteRequest1 to an JSON string + * Convert an instance of PatchBusinessApplicationOfficerAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributesOfficer.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributesOfficer.java new file mode 100644 index 00000000..8be70de5 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributesOfficer.java @@ -0,0 +1,264 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.AnnualIncome; +import org.openapitools.client.model.Occupation; +import org.openapitools.client.model.SourceOfIncome; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * PatchBusinessApplicationOfficerAttributesOfficer + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationOfficerAttributesOfficer { + public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; + @SerializedName(SERIALIZED_NAME_OCCUPATION) + private Occupation occupation; + + public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; + @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) + private AnnualIncome annualIncome; + + public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; + @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) + private SourceOfIncome sourceOfIncome; + + public PatchBusinessApplicationOfficerAttributesOfficer() { + } + + public PatchBusinessApplicationOfficerAttributesOfficer occupation(Occupation occupation) { + + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @javax.annotation.Nullable + public Occupation getOccupation() { + return occupation; + } + + + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public PatchBusinessApplicationOfficerAttributesOfficer annualIncome(AnnualIncome annualIncome) { + + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @javax.annotation.Nullable + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public PatchBusinessApplicationOfficerAttributesOfficer sourceOfIncome(SourceOfIncome sourceOfIncome) { + + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @javax.annotation.Nullable + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationOfficerAttributesOfficer patchBusinessApplicationOfficerAttributesOfficer = (PatchBusinessApplicationOfficerAttributesOfficer) o; + return Objects.equals(this.occupation, patchBusinessApplicationOfficerAttributesOfficer.occupation) && + Objects.equals(this.annualIncome, patchBusinessApplicationOfficerAttributesOfficer.annualIncome) && + Objects.equals(this.sourceOfIncome, patchBusinessApplicationOfficerAttributesOfficer.sourceOfIncome); + } + + @Override + public int hashCode() { + return Objects.hash(occupation, annualIncome, sourceOfIncome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationOfficerAttributesOfficer {\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("occupation"); + openapiFields.add("annualIncome"); + openapiFields.add("sourceOfIncome"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationOfficerAttributesOfficer + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PatchBusinessApplicationOfficerAttributesOfficer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationOfficerAttributesOfficer is not found in the empty JSON string", PatchBusinessApplicationOfficerAttributesOfficer.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PatchBusinessApplicationOfficerAttributesOfficer.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationOfficerAttributesOfficer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PatchBusinessApplicationOfficerAttributesOfficer.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchBusinessApplicationOfficerAttributesOfficer' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationOfficerAttributesOfficer.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PatchBusinessApplicationOfficerAttributesOfficer value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PatchBusinessApplicationOfficerAttributesOfficer read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PatchBusinessApplicationOfficerAttributesOfficer given an JSON string + * + * @param jsonString JSON string + * @return An instance of PatchBusinessApplicationOfficerAttributesOfficer + * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationOfficerAttributesOfficer + */ + public static PatchBusinessApplicationOfficerAttributesOfficer fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationOfficerAttributesOfficer.class); + } + + /** + * Convert an instance of PatchBusinessApplicationOfficerAttributesOfficer to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessCreditCard.java b/src/main/java/org/openapitools/client/model/PatchBusinessCreditCard.java index 906e4fcc..36b8dc63 100644 --- a/src/main/java/org/openapitools/client/model/PatchBusinessCreditCard.java +++ b/src/main/java/org/openapitools/client/model/PatchBusinessCreditCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessDebitCard.java b/src/main/java/org/openapitools/client/model/PatchBusinessDebitCard.java index ee17bbf8..2bf4ebea 100644 --- a/src/main/java/org/openapitools/client/model/PatchBusinessDebitCard.java +++ b/src/main/java/org/openapitools/client/model/PatchBusinessDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/PatchBusinessDebitCardAttributes.java index d204ec84..4bfaf61c 100644 --- a/src/main/java/org/openapitools/client/model/PatchBusinessDebitCardAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchBusinessDebitCardAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualCreditCard.java b/src/main/java/org/openapitools/client/model/PatchBusinessVirtualCreditCard.java index 333e8f4e..ece57cf3 100644 --- a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualCreditCard.java +++ b/src/main/java/org/openapitools/client/model/PatchBusinessVirtualCreditCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCard.java index 2da81b28..3449f776 100644 --- a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCard.java +++ b/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCardAttributes.java index 8ebd0cda..8b96b88c 100644 --- a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCardAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCardAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchChargebackTransaction.java b/src/main/java/org/openapitools/client/model/PatchChargebackTransaction.java index 48f64bf7..a1cda800 100644 --- a/src/main/java/org/openapitools/client/model/PatchChargebackTransaction.java +++ b/src/main/java/org/openapitools/client/model/PatchChargebackTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchCheckDeposit.java b/src/main/java/org/openapitools/client/model/PatchCheckDeposit.java index 2e1d22a1..c9459982 100644 --- a/src/main/java/org/openapitools/client/model/PatchCheckDeposit.java +++ b/src/main/java/org/openapitools/client/model/PatchCheckDeposit.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchCheckDepositAttributes.java b/src/main/java/org/openapitools/client/model/PatchCheckDepositAttributes.java index d9fe1e59..a3b11de2 100644 --- a/src/main/java/org/openapitools/client/model/PatchCheckDepositAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchCheckDepositAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchCounterparty.java b/src/main/java/org/openapitools/client/model/PatchCounterparty.java index a1e7fdad..d9856933 100644 --- a/src/main/java/org/openapitools/client/model/PatchCounterparty.java +++ b/src/main/java/org/openapitools/client/model/PatchCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchCounterpartyAttributes.java b/src/main/java/org/openapitools/client/model/PatchCounterpartyAttributes.java index 0d310dee..2a670dc4 100644 --- a/src/main/java/org/openapitools/client/model/PatchCounterpartyAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchCounterpartyAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualApplication.java b/src/main/java/org/openapitools/client/model/PatchIndividualApplication.java index d459167c..30951dca 100644 --- a/src/main/java/org/openapitools/client/model/PatchIndividualApplication.java +++ b/src/main/java/org/openapitools/client/model/PatchIndividualApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualApplicationAttributes.java b/src/main/java/org/openapitools/client/model/PatchIndividualApplicationAttributes.java index f9fe3b3d..695348dc 100644 --- a/src/main/java/org/openapitools/client/model/PatchIndividualApplicationAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchIndividualApplicationAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,10 +22,7 @@ import java.io.IOException; import java.util.Arrays; import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.BusinessVertical; import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.SoleProprietorshipAnnualRevenue; -import org.openapitools.client.model.SoleProprietorshipNumberOfEmployees; import org.openapitools.client.model.SourceOfIncome; import com.google.gson.Gson; @@ -73,22 +70,6 @@ public class PatchIndividualApplicationAttributes { @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) private SourceOfIncome sourceOfIncome; - public static final String SERIALIZED_NAME_ANNUAL_REVENUE = "annualRevenue"; - @SerializedName(SERIALIZED_NAME_ANNUAL_REVENUE) - private SoleProprietorshipAnnualRevenue annualRevenue; - - public static final String SERIALIZED_NAME_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_EMPLOYEES) - private SoleProprietorshipNumberOfEmployees numberOfEmployees; - - public static final String SERIALIZED_NAME_BUSINESS_VERTICAL = "businessVertical"; - @SerializedName(SERIALIZED_NAME_BUSINESS_VERTICAL) - private BusinessVertical businessVertical; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - public PatchIndividualApplicationAttributes() { } @@ -176,90 +157,6 @@ public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { } - public PatchIndividualApplicationAttributes annualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { - - this.annualRevenue = annualRevenue; - return this; - } - - /** - * Get annualRevenue - * @return annualRevenue - **/ - @javax.annotation.Nullable - public SoleProprietorshipAnnualRevenue getAnnualRevenue() { - return annualRevenue; - } - - - public void setAnnualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { - this.annualRevenue = annualRevenue; - } - - - public PatchIndividualApplicationAttributes numberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { - - this.numberOfEmployees = numberOfEmployees; - return this; - } - - /** - * Get numberOfEmployees - * @return numberOfEmployees - **/ - @javax.annotation.Nullable - public SoleProprietorshipNumberOfEmployees getNumberOfEmployees() { - return numberOfEmployees; - } - - - public void setNumberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { - this.numberOfEmployees = numberOfEmployees; - } - - - public PatchIndividualApplicationAttributes businessVertical(BusinessVertical businessVertical) { - - this.businessVertical = businessVertical; - return this; - } - - /** - * Get businessVertical - * @return businessVertical - **/ - @javax.annotation.Nullable - public BusinessVertical getBusinessVertical() { - return businessVertical; - } - - - public void setBusinessVertical(BusinessVertical businessVertical) { - this.businessVertical = businessVertical; - } - - - public PatchIndividualApplicationAttributes website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - @Override public boolean equals(Object o) { @@ -273,16 +170,12 @@ public boolean equals(Object o) { return Objects.equals(this.tags, patchIndividualApplicationAttributes.tags) && Objects.equals(this.occupation, patchIndividualApplicationAttributes.occupation) && Objects.equals(this.annualIncome, patchIndividualApplicationAttributes.annualIncome) && - Objects.equals(this.sourceOfIncome, patchIndividualApplicationAttributes.sourceOfIncome) && - Objects.equals(this.annualRevenue, patchIndividualApplicationAttributes.annualRevenue) && - Objects.equals(this.numberOfEmployees, patchIndividualApplicationAttributes.numberOfEmployees) && - Objects.equals(this.businessVertical, patchIndividualApplicationAttributes.businessVertical) && - Objects.equals(this.website, patchIndividualApplicationAttributes.website); + Objects.equals(this.sourceOfIncome, patchIndividualApplicationAttributes.sourceOfIncome); } @Override public int hashCode() { - return Objects.hash(tags, occupation, annualIncome, sourceOfIncome, annualRevenue, numberOfEmployees, businessVertical, website); + return Objects.hash(tags, occupation, annualIncome, sourceOfIncome); } @Override @@ -293,10 +186,6 @@ public String toString() { sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); - sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); - sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append("}"); return sb.toString(); } @@ -323,10 +212,6 @@ private String toIndentedString(Object o) { openapiFields.add("occupation"); openapiFields.add("annualIncome"); openapiFields.add("sourceOfIncome"); - openapiFields.add("annualRevenue"); - openapiFields.add("numberOfEmployees"); - openapiFields.add("businessVertical"); - openapiFields.add("website"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -353,9 +238,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualDebitCard.java b/src/main/java/org/openapitools/client/model/PatchIndividualDebitCard.java index 0422fb18..468ecfb3 100644 --- a/src/main/java/org/openapitools/client/model/PatchIndividualDebitCard.java +++ b/src/main/java/org/openapitools/client/model/PatchIndividualDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/PatchIndividualDebitCardAttributes.java index 65fdb998..ab0c1721 100644 --- a/src/main/java/org/openapitools/client/model/PatchIndividualDebitCardAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchIndividualDebitCardAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCard.java index 6dd7851a..1e6dccac 100644 --- a/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCard.java +++ b/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCardAttributes.java index 119f0af2..689c54c6 100644 --- a/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCardAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCardAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplication.java b/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplication.java new file mode 100644 index 00000000..3480eb2b --- /dev/null +++ b/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplication.java @@ -0,0 +1,248 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.PatchSoleProprietorApplicationAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * PatchSoleProprietorApplication + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchSoleProprietorApplication { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "individualApplication"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private PatchSoleProprietorApplicationAttributes attributes; + + public PatchSoleProprietorApplication() { + } + + public PatchSoleProprietorApplication type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public PatchSoleProprietorApplication attributes(PatchSoleProprietorApplicationAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nonnull + public PatchSoleProprietorApplicationAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(PatchSoleProprietorApplicationAttributes attributes) { + this.attributes = attributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchSoleProprietorApplication patchSoleProprietorApplication = (PatchSoleProprietorApplication) o; + return Objects.equals(this.type, patchSoleProprietorApplication.type) && + Objects.equals(this.attributes, patchSoleProprietorApplication.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchSoleProprietorApplication {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("attributes"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PatchSoleProprietorApplication + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PatchSoleProprietorApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchSoleProprietorApplication is not found in the empty JSON string", PatchSoleProprietorApplication.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PatchSoleProprietorApplication.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchSoleProprietorApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PatchSoleProprietorApplication.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `attributes` + PatchSoleProprietorApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PatchSoleProprietorApplication.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchSoleProprietorApplication' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchSoleProprietorApplication.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PatchSoleProprietorApplication value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PatchSoleProprietorApplication read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PatchSoleProprietorApplication given an JSON string + * + * @param jsonString JSON string + * @return An instance of PatchSoleProprietorApplication + * @throws IOException if the JSON string is invalid with respect to PatchSoleProprietorApplication + */ + public static PatchSoleProprietorApplication fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchSoleProprietorApplication.class); + } + + /** + * Convert an instance of PatchSoleProprietorApplication to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplicationAttributes.java b/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplicationAttributes.java new file mode 100644 index 00000000..9302c986 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplicationAttributes.java @@ -0,0 +1,323 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.BusinessVertical; +import org.openapitools.client.model.SoleProprietorshipAnnualRevenue; +import org.openapitools.client.model.SoleProprietorshipNumberOfEmployees; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * PatchSoleProprietorApplicationAttributes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchSoleProprietorApplicationAttributes { + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + private Object tags; + + public static final String SERIALIZED_NAME_ANNUAL_REVENUE = "annualRevenue"; + @SerializedName(SERIALIZED_NAME_ANNUAL_REVENUE) + private SoleProprietorshipAnnualRevenue annualRevenue; + + public static final String SERIALIZED_NAME_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_EMPLOYEES) + private SoleProprietorshipNumberOfEmployees numberOfEmployees; + + public static final String SERIALIZED_NAME_BUSINESS_VERTICAL = "businessVertical"; + @SerializedName(SERIALIZED_NAME_BUSINESS_VERTICAL) + private BusinessVertical businessVertical; + + public static final String SERIALIZED_NAME_WEBSITE = "website"; + @SerializedName(SERIALIZED_NAME_WEBSITE) + private String website; + + public PatchSoleProprietorApplicationAttributes() { + } + + public PatchSoleProprietorApplicationAttributes tags(Object tags) { + + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + public Object getTags() { + return tags; + } + + + public void setTags(Object tags) { + this.tags = tags; + } + + + public PatchSoleProprietorApplicationAttributes annualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { + + this.annualRevenue = annualRevenue; + return this; + } + + /** + * Get annualRevenue + * @return annualRevenue + **/ + @javax.annotation.Nullable + public SoleProprietorshipAnnualRevenue getAnnualRevenue() { + return annualRevenue; + } + + + public void setAnnualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + } + + + public PatchSoleProprietorApplicationAttributes numberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { + + this.numberOfEmployees = numberOfEmployees; + return this; + } + + /** + * Get numberOfEmployees + * @return numberOfEmployees + **/ + @javax.annotation.Nullable + public SoleProprietorshipNumberOfEmployees getNumberOfEmployees() { + return numberOfEmployees; + } + + + public void setNumberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + } + + + public PatchSoleProprietorApplicationAttributes businessVertical(BusinessVertical businessVertical) { + + this.businessVertical = businessVertical; + return this; + } + + /** + * Get businessVertical + * @return businessVertical + **/ + @javax.annotation.Nullable + public BusinessVertical getBusinessVertical() { + return businessVertical; + } + + + public void setBusinessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + } + + + public PatchSoleProprietorApplicationAttributes website(String website) { + + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @javax.annotation.Nullable + public String getWebsite() { + return website; + } + + + public void setWebsite(String website) { + this.website = website; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchSoleProprietorApplicationAttributes patchSoleProprietorApplicationAttributes = (PatchSoleProprietorApplicationAttributes) o; + return Objects.equals(this.tags, patchSoleProprietorApplicationAttributes.tags) && + Objects.equals(this.annualRevenue, patchSoleProprietorApplicationAttributes.annualRevenue) && + Objects.equals(this.numberOfEmployees, patchSoleProprietorApplicationAttributes.numberOfEmployees) && + Objects.equals(this.businessVertical, patchSoleProprietorApplicationAttributes.businessVertical) && + Objects.equals(this.website, patchSoleProprietorApplicationAttributes.website); + } + + @Override + public int hashCode() { + return Objects.hash(tags, annualRevenue, numberOfEmployees, businessVertical, website); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchSoleProprietorApplicationAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); + sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); + sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tags"); + openapiFields.add("annualRevenue"); + openapiFields.add("numberOfEmployees"); + openapiFields.add("businessVertical"); + openapiFields.add("website"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PatchSoleProprietorApplicationAttributes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PatchSoleProprietorApplicationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchSoleProprietorApplicationAttributes is not found in the empty JSON string", PatchSoleProprietorApplicationAttributes.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PatchSoleProprietorApplicationAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchSoleProprietorApplicationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PatchSoleProprietorApplicationAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchSoleProprietorApplicationAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchSoleProprietorApplicationAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PatchSoleProprietorApplicationAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PatchSoleProprietorApplicationAttributes read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PatchSoleProprietorApplicationAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of PatchSoleProprietorApplicationAttributes + * @throws IOException if the JSON string is invalid with respect to PatchSoleProprietorApplicationAttributes + */ + public static PatchSoleProprietorApplicationAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchSoleProprietorApplicationAttributes.class); + } + + /** + * Convert an instance of PatchSoleProprietorApplicationAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/PatchTransactionTags.java b/src/main/java/org/openapitools/client/model/PatchTransactionTags.java index 3929123a..3d7695af 100644 --- a/src/main/java/org/openapitools/client/model/PatchTransactionTags.java +++ b/src/main/java/org/openapitools/client/model/PatchTransactionTags.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchTransactionTagsAttributes.java b/src/main/java/org/openapitools/client/model/PatchTransactionTagsAttributes.java index 878f356c..d151b5ad 100644 --- a/src/main/java/org/openapitools/client/model/PatchTransactionTagsAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchTransactionTagsAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchTrustApplication.java b/src/main/java/org/openapitools/client/model/PatchTrustApplication.java index ca05efcb..23965abd 100644 --- a/src/main/java/org/openapitools/client/model/PatchTrustApplication.java +++ b/src/main/java/org/openapitools/client/model/PatchTrustApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PatchTrustApplicationAttributes.java b/src/main/java/org/openapitools/client/model/PatchTrustApplicationAttributes.java index 882166af..ec6a9749 100644 --- a/src/main/java/org/openapitools/client/model/PatchTrustApplicationAttributes.java +++ b/src/main/java/org/openapitools/client/model/PatchTrustApplicationAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Payment.java b/src/main/java/org/openapitools/client/model/Payment.java index c1a18561..d81edbaf 100644 --- a/src/main/java/org/openapitools/client/model/Payment.java +++ b/src/main/java/org/openapitools/client/model/Payment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PaymentAdvanceTransaction.java b/src/main/java/org/openapitools/client/model/PaymentAdvanceTransaction.java index 1bbff376..bb1b7615 100644 --- a/src/main/java/org/openapitools/client/model/PaymentAdvanceTransaction.java +++ b/src/main/java/org/openapitools/client/model/PaymentAdvanceTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationship.java b/src/main/java/org/openapitools/client/model/PaymentRelationship.java index 4947d423..ccfb98fe 100644 --- a/src/main/java/org/openapitools/client/model/PaymentRelationship.java +++ b/src/main/java/org/openapitools/client/model/PaymentRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationshipData.java b/src/main/java/org/openapitools/client/model/PaymentRelationshipData.java index 6c6cc57d..281b7068 100644 --- a/src/main/java/org/openapitools/client/model/PaymentRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/PaymentRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationships.java b/src/main/java/org/openapitools/client/model/PaymentRelationships.java index cc03d5a3..06e680f4 100644 --- a/src/main/java/org/openapitools/client/model/PaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/PaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomers.java b/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomers.java index ba6fd5d8..3bc8bac4 100644 --- a/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomers.java +++ b/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomers.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomersDataInner.java b/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomersDataInner.java index 820bd000..0dabf57c 100644 --- a/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomersDataInner.java +++ b/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomersDataInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Phone.java b/src/main/java/org/openapitools/client/model/Phone.java index 0ef3048b..e276369f 100644 --- a/src/main/java/org/openapitools/client/model/Phone.java +++ b/src/main/java/org/openapitools/client/model/Phone.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PhysicalCardStatus.java b/src/main/java/org/openapitools/client/model/PhysicalCardStatus.java index 3124ea84..a69cf9e3 100644 --- a/src/main/java/org/openapitools/client/model/PhysicalCardStatus.java +++ b/src/main/java/org/openapitools/client/model/PhysicalCardStatus.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PinStatus.java b/src/main/java/org/openapitools/client/model/PinStatus.java index 161525a6..f0971db8 100644 --- a/src/main/java/org/openapitools/client/model/PinStatus.java +++ b/src/main/java/org/openapitools/client/model/PinStatus.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PinStatusAttributes.java b/src/main/java/org/openapitools/client/model/PinStatusAttributes.java index caefc7b1..bc9a0286 100644 --- a/src/main/java/org/openapitools/client/model/PinStatusAttributes.java +++ b/src/main/java/org/openapitools/client/model/PinStatusAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PowerOfAttorneyAgent.java b/src/main/java/org/openapitools/client/model/PowerOfAttorneyAgent.java index dc675208..799e4faf 100644 --- a/src/main/java/org/openapitools/client/model/PowerOfAttorneyAgent.java +++ b/src/main/java/org/openapitools/client/model/PowerOfAttorneyAgent.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequest.java index f041f0dd..0b0f20a1 100644 --- a/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequest.java +++ b/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequestAllOfAttributes.java b/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequestAllOfAttributes.java index d0adaa5b..bb383d06 100644 --- a/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequestAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequestAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PurchaseTransaction.java b/src/main/java/org/openapitools/client/model/PurchaseTransaction.java index e1ffacca..cf308236 100644 --- a/src/main/java/org/openapitools/client/model/PurchaseTransaction.java +++ b/src/main/java/org/openapitools/client/model/PurchaseTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/PurchaseTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/PurchaseTransactionAllOfAttributes.java index 9e6e929d..6709a5bd 100644 --- a/src/main/java/org/openapitools/client/model/PurchaseTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/PurchaseTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivedAchTransaction.java b/src/main/java/org/openapitools/client/model/ReceivedAchTransaction.java index bb16aa16..46b090b4 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedAchTransaction.java +++ b/src/main/java/org/openapitools/client/model/ReceivedAchTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivedAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReceivedAchTransactionAllOfAttributes.java index 9ebefed5..348ff492 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedAchTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/ReceivedAchTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivedPayment.java b/src/main/java/org/openapitools/client/model/ReceivedPayment.java index d8ae617b..308d4a9d 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedPayment.java +++ b/src/main/java/org/openapitools/client/model/ReceivedPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -247,6 +247,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { ReceivedPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); } + // validate the optional field `relationships` + if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { + ReceivedPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentAttributes.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentAttributes.java index e9bb912a..181e24e9 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/ReceivedPaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationship.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationship.java index 41507f4c..2dda28ab 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationship.java +++ b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipData.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipData.java index 66113940..bd1b1b77 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationships.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationships.java index d382d747..a3a590b6 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -181,50 +181,6 @@ public void setRepayPaymentAdvanceTransaction(ReceivedPaymentRelationshipsReceiv this.repayPaymentAdvanceTransaction = repayPaymentAdvanceTransaction; } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ReceivedPaymentRelationships instance itself - */ - public ReceivedPaymentRelationships putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -240,13 +196,12 @@ public boolean equals(Object o) { Objects.equals(this.customer, receivedPaymentRelationships.customer) && Objects.equals(this.receivePaymentTransaction, receivedPaymentRelationships.receivePaymentTransaction) && Objects.equals(this.paymentAdvanceTransaction, receivedPaymentRelationships.paymentAdvanceTransaction) && - Objects.equals(this.repayPaymentAdvanceTransaction, receivedPaymentRelationships.repayPaymentAdvanceTransaction)&& - Objects.equals(this.additionalProperties, receivedPaymentRelationships.additionalProperties); + Objects.equals(this.repayPaymentAdvanceTransaction, receivedPaymentRelationships.repayPaymentAdvanceTransaction); } @Override public int hashCode() { - return Objects.hash(account, customer, receivePaymentTransaction, paymentAdvanceTransaction, repayPaymentAdvanceTransaction, additionalProperties); + return Objects.hash(account, customer, receivePaymentTransaction, paymentAdvanceTransaction, repayPaymentAdvanceTransaction); } @Override @@ -258,7 +213,6 @@ public String toString() { sb.append(" receivePaymentTransaction: ").append(toIndentedString(receivePaymentTransaction)).append("\n"); sb.append(" paymentAdvanceTransaction: ").append(toIndentedString(paymentAdvanceTransaction)).append("\n"); sb.append(" repayPaymentAdvanceTransaction: ").append(toIndentedString(repayPaymentAdvanceTransaction)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -306,6 +260,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReceivedPaymentRelationships.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ReceivedPaymentRelationships.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -346,23 +308,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ReceivedPaymentRelationships value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } elementAdapter.write(out, obj); } @@ -370,28 +315,7 @@ else if (entry.getValue() instanceof Character) public ReceivedPaymentRelationships read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ReceivedPaymentRelationships instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomer.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomer.java index b915fc09..57211775 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomer.java +++ b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomerData.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomerData.java index d4a272a1..a167d111 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomerData.java +++ b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomerData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java index 12fc8f85..ee43571e 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java +++ b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java index 5e21ab55..829b43ad 100644 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java +++ b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReceivingAccountRelationship.java b/src/main/java/org/openapitools/client/model/ReceivingAccountRelationship.java index 66119fa3..bf050a09 100644 --- a/src/main/java/org/openapitools/client/model/ReceivingAccountRelationship.java +++ b/src/main/java/org/openapitools/client/model/ReceivingAccountRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationships.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationships.java index 56abff96..f8066ab3 100644 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccount.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccount.java index f096288c..a5a2c094 100644 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccount.java +++ b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccountData.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccountData.java index 4a7ea663..9342a23f 100644 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccountData.java +++ b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterparty.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterparty.java index fe77ca2f..153a91e9 100644 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterparty.java +++ b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterpartyData.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterpartyData.java index fe2e192e..751743a4 100644 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterpartyData.java +++ b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterpartyData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrg.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrg.java index 6555dd1c..fb2699d2 100644 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrg.java +++ b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrg.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrgData.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrgData.java index f8d9d033..efff1200 100644 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrgData.java +++ b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrgData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationships.java b/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationships.java index 4c94f607..25b71c1c 100644 --- a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java b/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java index c10101dc..9420cb56 100644 --- a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java +++ b/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java b/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java index f5ae12d0..1784a6c9 100644 --- a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java +++ b/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringCreditAchPayment.java b/src/main/java/org/openapitools/client/model/RecurringCreditAchPayment.java index 95f9f243..30b11e41 100644 --- a/src/main/java/org/openapitools/client/model/RecurringCreditAchPayment.java +++ b/src/main/java/org/openapitools/client/model/RecurringCreditAchPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringCreditAchPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/RecurringCreditAchPaymentAllOfAttributes.java index 3e0e36f0..69f060d4 100644 --- a/src/main/java/org/openapitools/client/model/RecurringCreditAchPaymentAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/RecurringCreditAchPaymentAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringCreditBookPayment.java b/src/main/java/org/openapitools/client/model/RecurringCreditBookPayment.java index 9b417ea5..dab91c37 100644 --- a/src/main/java/org/openapitools/client/model/RecurringCreditBookPayment.java +++ b/src/main/java/org/openapitools/client/model/RecurringCreditBookPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringCreditBookPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/RecurringCreditBookPaymentAllOfAttributes.java index ee7ea8d4..799d5678 100644 --- a/src/main/java/org/openapitools/client/model/RecurringCreditBookPaymentAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/RecurringCreditBookPaymentAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringDebitAchPayment.java b/src/main/java/org/openapitools/client/model/RecurringDebitAchPayment.java index 7ba50374..5f7c3764 100644 --- a/src/main/java/org/openapitools/client/model/RecurringDebitAchPayment.java +++ b/src/main/java/org/openapitools/client/model/RecurringDebitAchPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringDebitAchPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/RecurringDebitAchPaymentAllOfAttributes.java index 0fa236a0..9aff1a8a 100644 --- a/src/main/java/org/openapitools/client/model/RecurringDebitAchPaymentAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/RecurringDebitAchPaymentAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringPayment.java b/src/main/java/org/openapitools/client/model/RecurringPayment.java index 2d1096cb..73d7f5d0 100644 --- a/src/main/java/org/openapitools/client/model/RecurringPayment.java +++ b/src/main/java/org/openapitools/client/model/RecurringPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringPaymentRelationship.java b/src/main/java/org/openapitools/client/model/RecurringPaymentRelationship.java index b94f98a0..43bc8655 100644 --- a/src/main/java/org/openapitools/client/model/RecurringPaymentRelationship.java +++ b/src/main/java/org/openapitools/client/model/RecurringPaymentRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RecurringPaymentRelationshipData.java b/src/main/java/org/openapitools/client/model/RecurringPaymentRelationshipData.java index 7a391f96..09d5a97d 100644 --- a/src/main/java/org/openapitools/client/model/RecurringPaymentRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/RecurringPaymentRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RelatedTransaction.java b/src/main/java/org/openapitools/client/model/RelatedTransaction.java index 440e0b78..58e07116 100644 --- a/src/main/java/org/openapitools/client/model/RelatedTransaction.java +++ b/src/main/java/org/openapitools/client/model/RelatedTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RelatedTransactionRelationship.java b/src/main/java/org/openapitools/client/model/RelatedTransactionRelationship.java index 11ef1e46..53c763e7 100644 --- a/src/main/java/org/openapitools/client/model/RelatedTransactionRelationship.java +++ b/src/main/java/org/openapitools/client/model/RelatedTransactionRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Relationship.java b/src/main/java/org/openapitools/client/model/Relationship.java index c3817492..4a270566 100644 --- a/src/main/java/org/openapitools/client/model/Relationship.java +++ b/src/main/java/org/openapitools/client/model/Relationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RelationshipData.java b/src/main/java/org/openapitools/client/model/RelationshipData.java index 64a6cc74..96add861 100644 --- a/src/main/java/org/openapitools/client/model/RelationshipData.java +++ b/src/main/java/org/openapitools/client/model/RelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Relationships.java b/src/main/java/org/openapitools/client/model/Relationships.java index 9a6060fd..1002c220 100644 --- a/src/main/java/org/openapitools/client/model/Relationships.java +++ b/src/main/java/org/openapitools/client/model/Relationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Relationships1.java b/src/main/java/org/openapitools/client/model/Relationships1.java index ff505534..5b01e6d8 100644 --- a/src/main/java/org/openapitools/client/model/Relationships1.java +++ b/src/main/java/org/openapitools/client/model/Relationships1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Relationships1Account.java b/src/main/java/org/openapitools/client/model/Relationships1Account.java index 08abf67b..b21e37e7 100644 --- a/src/main/java/org/openapitools/client/model/Relationships1Account.java +++ b/src/main/java/org/openapitools/client/model/Relationships1Account.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Relationships1AccountData.java b/src/main/java/org/openapitools/client/model/Relationships1AccountData.java index 3d785eb5..21a95111 100644 --- a/src/main/java/org/openapitools/client/model/Relationships1AccountData.java +++ b/src/main/java/org/openapitools/client/model/Relationships1AccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RelationshipsAccount.java b/src/main/java/org/openapitools/client/model/RelationshipsAccount.java index 2860d535..41729b77 100644 --- a/src/main/java/org/openapitools/client/model/RelationshipsAccount.java +++ b/src/main/java/org/openapitools/client/model/RelationshipsAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RelationshipsAccountData.java b/src/main/java/org/openapitools/client/model/RelationshipsAccountData.java index 5cc89b0a..1542c47f 100644 --- a/src/main/java/org/openapitools/client/model/RelationshipsAccountData.java +++ b/src/main/java/org/openapitools/client/model/RelationshipsAccountData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RelationshipsCustomer.java b/src/main/java/org/openapitools/client/model/RelationshipsCustomer.java index 7c160f82..2cc2b683 100644 --- a/src/main/java/org/openapitools/client/model/RelationshipsCustomer.java +++ b/src/main/java/org/openapitools/client/model/RelationshipsCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RelationshipsCustomerData.java b/src/main/java/org/openapitools/client/model/RelationshipsCustomerData.java index 423e4063..49d38f7f 100644 --- a/src/main/java/org/openapitools/client/model/RelationshipsCustomerData.java +++ b/src/main/java/org/openapitools/client/model/RelationshipsCustomerData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReleaseTransaction.java b/src/main/java/org/openapitools/client/model/ReleaseTransaction.java index 84d521b5..fbdc76c2 100644 --- a/src/main/java/org/openapitools/client/model/ReleaseTransaction.java +++ b/src/main/java/org/openapitools/client/model/ReleaseTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReleaseTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReleaseTransactionAllOfAttributes.java index 84ba5363..e5ebee41 100644 --- a/src/main/java/org/openapitools/client/model/ReleaseTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/ReleaseTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RepaidPaymentAdvanceTransaction.java b/src/main/java/org/openapitools/client/model/RepaidPaymentAdvanceTransaction.java index a2da95d0..b494abb8 100644 --- a/src/main/java/org/openapitools/client/model/RepaidPaymentAdvanceTransaction.java +++ b/src/main/java/org/openapitools/client/model/RepaidPaymentAdvanceTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Repayment.java b/src/main/java/org/openapitools/client/model/Repayment.java index f6ea6e90..aa555dbb 100644 --- a/src/main/java/org/openapitools/client/model/Repayment.java +++ b/src/main/java/org/openapitools/client/model/Repayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RepaymentRelationship.java b/src/main/java/org/openapitools/client/model/RepaymentRelationship.java index e124f5b4..3f28e333 100644 --- a/src/main/java/org/openapitools/client/model/RepaymentRelationship.java +++ b/src/main/java/org/openapitools/client/model/RepaymentRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RepaymentRelationshipData.java b/src/main/java/org/openapitools/client/model/RepaymentRelationshipData.java index 155e50bc..9e9d3e6d 100644 --- a/src/main/java/org/openapitools/client/model/RepaymentRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/RepaymentRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RequireIdVerification.java b/src/main/java/org/openapitools/client/model/RequireIdVerification.java index b3aaeccb..6fd6516d 100644 --- a/src/main/java/org/openapitools/client/model/RequireIdVerification.java +++ b/src/main/java/org/openapitools/client/model/RequireIdVerification.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ResponseContact.java b/src/main/java/org/openapitools/client/model/ResponseContact.java index ec8f22c3..11a4130c 100644 --- a/src/main/java/org/openapitools/client/model/ResponseContact.java +++ b/src/main/java/org/openapitools/client/model/ResponseContact.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest.java b/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequest.java similarity index 67% rename from src/main/java/org/openapitools/client/model/ExecuteRequest.java rename to src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequest.java index 4ed0b9e2..44e2ef6e 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest.java +++ b/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.client.model.ExecuteRequestData; +import org.openapitools.client.model.ReturnCheckPaymentRequestData; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,18 +48,18 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest + * ReturnCheckPaymentRequest */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest { +public class ReturnCheckPaymentRequest { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private ExecuteRequestData data; + private ReturnCheckPaymentRequestData data; - public ExecuteRequest() { + public ReturnCheckPaymentRequest() { } - public ExecuteRequest data(ExecuteRequestData data) { + public ReturnCheckPaymentRequest data(ReturnCheckPaymentRequestData data) { this.data = data; return this; @@ -70,12 +70,12 @@ public ExecuteRequest data(ExecuteRequestData data) { * @return data **/ @javax.annotation.Nullable - public ExecuteRequestData getData() { + public ReturnCheckPaymentRequestData getData() { return data; } - public void setData(ExecuteRequestData data) { + public void setData(ReturnCheckPaymentRequestData data) { this.data = data; } @@ -89,8 +89,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest executeRequest = (ExecuteRequest) o; - return Objects.equals(this.data, executeRequest.data); + ReturnCheckPaymentRequest returnCheckPaymentRequest = (ReturnCheckPaymentRequest) o; + return Objects.equals(this.data, returnCheckPaymentRequest.data); } @Override @@ -101,7 +101,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest {\n"); + sb.append("class ReturnCheckPaymentRequest {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -135,26 +135,26 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest + * @throws IOException if the JSON Element is invalid with respect to ReturnCheckPaymentRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest is not found in the empty JSON string", ExecuteRequest.openapiRequiredFields.toString())); + if (!ReturnCheckPaymentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnCheckPaymentRequest is not found in the empty JSON string", ReturnCheckPaymentRequest.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!ReturnCheckPaymentRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnCheckPaymentRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `data` if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ExecuteRequestData.validateJsonElement(jsonObj.get("data")); + ReturnCheckPaymentRequestData.validateJsonElement(jsonObj.get("data")); } } @@ -162,22 +162,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest' and its subtypes + if (!ReturnCheckPaymentRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnCheckPaymentRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnCheckPaymentRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest value) throws IOException { + public void write(JsonWriter out, ReturnCheckPaymentRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest read(JsonReader in) throws IOException { + public ReturnCheckPaymentRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -188,18 +188,18 @@ public ExecuteRequest read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest given an JSON string + * Create an instance of ReturnCheckPaymentRequest given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest + * @return An instance of ReturnCheckPaymentRequest + * @throws IOException if the JSON string is invalid with respect to ReturnCheckPaymentRequest */ - public static ExecuteRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest.class); + public static ReturnCheckPaymentRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnCheckPaymentRequest.class); } /** - * Convert an instance of ExecuteRequest to an JSON string + * Convert an instance of ReturnCheckPaymentRequest to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestData.java b/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestData.java new file mode 100644 index 00000000..696a457c --- /dev/null +++ b/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestData.java @@ -0,0 +1,241 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.ReturnCheckPaymentRequestDataAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * ReturnCheckPaymentRequestData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnCheckPaymentRequestData { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type = "checkPaymentReturn"; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private ReturnCheckPaymentRequestDataAttributes attributes; + + public ReturnCheckPaymentRequestData() { + } + + public ReturnCheckPaymentRequestData type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public ReturnCheckPaymentRequestData attributes(ReturnCheckPaymentRequestDataAttributes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + public ReturnCheckPaymentRequestDataAttributes getAttributes() { + return attributes; + } + + + public void setAttributes(ReturnCheckPaymentRequestDataAttributes attributes) { + this.attributes = attributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnCheckPaymentRequestData returnCheckPaymentRequestData = (ReturnCheckPaymentRequestData) o; + return Objects.equals(this.type, returnCheckPaymentRequestData.type) && + Objects.equals(this.attributes, returnCheckPaymentRequestData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnCheckPaymentRequestData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnCheckPaymentRequestData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnCheckPaymentRequestData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnCheckPaymentRequestData is not found in the empty JSON string", ReturnCheckPaymentRequestData.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnCheckPaymentRequestData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnCheckPaymentRequestData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ReturnCheckPaymentRequestDataAttributes.validateJsonElement(jsonObj.get("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnCheckPaymentRequestData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnCheckPaymentRequestData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnCheckPaymentRequestData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnCheckPaymentRequestData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnCheckPaymentRequestData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnCheckPaymentRequestData given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnCheckPaymentRequestData + * @throws IOException if the JSON string is invalid with respect to ReturnCheckPaymentRequestData + */ + public static ReturnCheckPaymentRequestData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnCheckPaymentRequestData.class); + } + + /** + * Convert an instance of ReturnCheckPaymentRequestData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest21DataAttributes.java b/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestDataAttributes.java similarity index 67% rename from src/main/java/org/openapitools/client/model/ExecuteRequest21DataAttributes.java rename to src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestDataAttributes.java index 0f2997dc..a5dc4de4 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest21DataAttributes.java +++ b/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -48,18 +48,18 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest21DataAttributes + * ReturnCheckPaymentRequestDataAttributes */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest21DataAttributes { +public class ReturnCheckPaymentRequestDataAttributes { public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) private ReturnReason reason; - public ExecuteRequest21DataAttributes() { + public ReturnCheckPaymentRequestDataAttributes() { } - public ExecuteRequest21DataAttributes reason(ReturnReason reason) { + public ReturnCheckPaymentRequestDataAttributes reason(ReturnReason reason) { this.reason = reason; return this; @@ -89,8 +89,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest21DataAttributes executeRequest21DataAttributes = (ExecuteRequest21DataAttributes) o; - return Objects.equals(this.reason, executeRequest21DataAttributes.reason); + ReturnCheckPaymentRequestDataAttributes returnCheckPaymentRequestDataAttributes = (ReturnCheckPaymentRequestDataAttributes) o; + return Objects.equals(this.reason, returnCheckPaymentRequestDataAttributes.reason); } @Override @@ -101,7 +101,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest21DataAttributes {\n"); + sb.append("class ReturnCheckPaymentRequestDataAttributes {\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append("}"); return sb.toString(); @@ -135,20 +135,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest21DataAttributes + * @throws IOException if the JSON Element is invalid with respect to ReturnCheckPaymentRequestDataAttributes */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest21DataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest21DataAttributes is not found in the empty JSON string", ExecuteRequest21DataAttributes.openapiRequiredFields.toString())); + if (!ReturnCheckPaymentRequestDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnCheckPaymentRequestDataAttributes is not found in the empty JSON string", ReturnCheckPaymentRequestDataAttributes.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest21DataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest21DataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!ReturnCheckPaymentRequestDataAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnCheckPaymentRequestDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -158,22 +158,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest21DataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest21DataAttributes' and its subtypes + if (!ReturnCheckPaymentRequestDataAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnCheckPaymentRequestDataAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest21DataAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnCheckPaymentRequestDataAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest21DataAttributes value) throws IOException { + public void write(JsonWriter out, ReturnCheckPaymentRequestDataAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest21DataAttributes read(JsonReader in) throws IOException { + public ReturnCheckPaymentRequestDataAttributes read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -184,18 +184,18 @@ public ExecuteRequest21DataAttributes read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest21DataAttributes given an JSON string + * Create an instance of ReturnCheckPaymentRequestDataAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest21DataAttributes - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest21DataAttributes + * @return An instance of ReturnCheckPaymentRequestDataAttributes + * @throws IOException if the JSON string is invalid with respect to ReturnCheckPaymentRequestDataAttributes */ - public static ExecuteRequest21DataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest21DataAttributes.class); + public static ReturnCheckPaymentRequestDataAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnCheckPaymentRequestDataAttributes.class); } /** - * Convert an instance of ExecuteRequest21DataAttributes to an JSON string + * Convert an instance of ReturnCheckPaymentRequestDataAttributes to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/ReturnReason.java b/src/main/java/org/openapitools/client/model/ReturnReason.java index 68ddf190..5ae64896 100644 --- a/src/main/java/org/openapitools/client/model/ReturnReason.java +++ b/src/main/java/org/openapitools/client/model/ReturnReason.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReturnedAchTransaction.java b/src/main/java/org/openapitools/client/model/ReturnedAchTransaction.java index 230b6a7f..9e7ffafb 100644 --- a/src/main/java/org/openapitools/client/model/ReturnedAchTransaction.java +++ b/src/main/java/org/openapitools/client/model/ReturnedAchTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReturnedAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReturnedAchTransactionAllOfAttributes.java index c93ab70c..c0a0b924 100644 --- a/src/main/java/org/openapitools/client/model/ReturnedAchTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/ReturnedAchTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransaction.java b/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransaction.java index 7b5394c4..a2b836e5 100644 --- a/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransaction.java +++ b/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransactionAllOfAttributes.java index 93acb69a..c3bfd8e0 100644 --- a/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransaction.java b/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransaction.java index 50b6e261..dadb174d 100644 --- a/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransaction.java +++ b/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransactionAllOfAttributes.java index c2bccaa8..87531568 100644 --- a/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransaction.java b/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransaction.java index 7fd18afc..0918d2f3 100644 --- a/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransaction.java +++ b/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransactionAllOfAttributes.java index 77ccb811..73f75eb4 100644 --- a/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReturnedRelationship.java b/src/main/java/org/openapitools/client/model/ReturnedRelationship.java index c1fe8c75..a4cba874 100644 --- a/src/main/java/org/openapitools/client/model/ReturnedRelationship.java +++ b/src/main/java/org/openapitools/client/model/ReturnedRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReversalTransaction.java b/src/main/java/org/openapitools/client/model/ReversalTransaction.java index b1cb84e3..788aa5dc 100644 --- a/src/main/java/org/openapitools/client/model/ReversalTransaction.java +++ b/src/main/java/org/openapitools/client/model/ReversalTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ReversalTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReversalTransactionAllOfAttributes.java index 778f0591..3c60693b 100644 --- a/src/main/java/org/openapitools/client/model/ReversalTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/ReversalTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Revocability.java b/src/main/java/org/openapitools/client/model/Revocability.java index 05672e83..403aae4b 100644 --- a/src/main/java/org/openapitools/client/model/Revocability.java +++ b/src/main/java/org/openapitools/client/model/Revocability.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Reward.java b/src/main/java/org/openapitools/client/model/Reward.java index 3413cac2..603a9e8c 100644 --- a/src/main/java/org/openapitools/client/model/Reward.java +++ b/src/main/java/org/openapitools/client/model/Reward.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RewardAttributes.java b/src/main/java/org/openapitools/client/model/RewardAttributes.java index ec0c58e7..788beda3 100644 --- a/src/main/java/org/openapitools/client/model/RewardAttributes.java +++ b/src/main/java/org/openapitools/client/model/RewardAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RewardRelationship.java b/src/main/java/org/openapitools/client/model/RewardRelationship.java index 3d1debe3..7e6ca8df 100644 --- a/src/main/java/org/openapitools/client/model/RewardRelationship.java +++ b/src/main/java/org/openapitools/client/model/RewardRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RewardRelationshipData.java b/src/main/java/org/openapitools/client/model/RewardRelationshipData.java index dd80a517..b37e37dc 100644 --- a/src/main/java/org/openapitools/client/model/RewardRelationshipData.java +++ b/src/main/java/org/openapitools/client/model/RewardRelationshipData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RewardRelationships.java b/src/main/java/org/openapitools/client/model/RewardRelationships.java index 0b083447..d8a6c7c3 100644 --- a/src/main/java/org/openapitools/client/model/RewardRelationships.java +++ b/src/main/java/org/openapitools/client/model/RewardRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RewardTransaction.java b/src/main/java/org/openapitools/client/model/RewardTransaction.java index 757f7943..dbcc668f 100644 --- a/src/main/java/org/openapitools/client/model/RewardTransaction.java +++ b/src/main/java/org/openapitools/client/model/RewardTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/RewardTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/RewardTransactionAllOfAttributes.java index 7fc5a291..a32b508c 100644 --- a/src/main/java/org/openapitools/client/model/RewardTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/RewardTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Schedule.java b/src/main/java/org/openapitools/client/model/Schedule.java index 0acbb843..6a22fb36 100644 --- a/src/main/java/org/openapitools/client/model/Schedule.java +++ b/src/main/java/org/openapitools/client/model/Schedule.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Schedule1.java b/src/main/java/org/openapitools/client/model/Schedule1.java new file mode 100644 index 00000000..0b321e32 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/Schedule1.java @@ -0,0 +1,230 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import org.openapitools.client.model.MonthlySchedule; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import org.openapitools.client.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Schedule1 extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Schedule1.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Schedule1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Schedule1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterMonthlySchedule = gson.getDelegateAdapter(this, TypeToken.get(MonthlySchedule.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Schedule1 value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `MonthlySchedule` + if (value.getActualInstance() instanceof MonthlySchedule) { + JsonElement element = adapterMonthlySchedule.toJsonTree((MonthlySchedule)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: MonthlySchedule"); + } + + @Override + public Schedule1 read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize MonthlySchedule + try { + // validate the JSON object to see if any exception is thrown + MonthlySchedule.validateJsonElement(jsonElement); + actualAdapter = adapterMonthlySchedule; + match++; + log.log(Level.FINER, "Input data matches schema 'MonthlySchedule'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for MonthlySchedule failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'MonthlySchedule'", e); + } + + if (match == 1) { + Schedule1 ret = new Schedule1(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for Schedule1: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public Schedule1() { + super("oneOf", Boolean.FALSE); + } + + public Schedule1(MonthlySchedule o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("MonthlySchedule", MonthlySchedule.class); + } + + @Override + public Map> getSchemas() { + return Schedule1.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * MonthlySchedule + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof MonthlySchedule) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be MonthlySchedule"); + } + + /** + * Get the actual instance, which can be the following: + * MonthlySchedule + * + * @return The actual instance (MonthlySchedule) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `MonthlySchedule`. If the actual instance is not `MonthlySchedule`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MonthlySchedule` + * @throws ClassCastException if the instance is not `MonthlySchedule` + */ + public MonthlySchedule getMonthlySchedule() throws ClassCastException { + return (MonthlySchedule)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Schedule1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with MonthlySchedule + try { + MonthlySchedule.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for MonthlySchedule failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for Schedule1 with oneOf schemas: MonthlySchedule. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of Schedule1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of Schedule1 + * @throws IOException if the JSON string is invalid with respect to Schedule1 + */ + public static Schedule1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Schedule1.class); + } + + /** + * Convert an instance of Schedule1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/SettlementTransaction.java b/src/main/java/org/openapitools/client/model/SettlementTransaction.java index 1b4a7b81..30678894 100644 --- a/src/main/java/org/openapitools/client/model/SettlementTransaction.java +++ b/src/main/java/org/openapitools/client/model/SettlementTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/SoleProprietorshipAnnualRevenue.java b/src/main/java/org/openapitools/client/model/SoleProprietorshipAnnualRevenue.java index 2e4dc1d4..f3c2eabd 100644 --- a/src/main/java/org/openapitools/client/model/SoleProprietorshipAnnualRevenue.java +++ b/src/main/java/org/openapitools/client/model/SoleProprietorshipAnnualRevenue.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/SoleProprietorshipNumberOfEmployees.java b/src/main/java/org/openapitools/client/model/SoleProprietorshipNumberOfEmployees.java index b668b57e..6248d366 100644 --- a/src/main/java/org/openapitools/client/model/SoleProprietorshipNumberOfEmployees.java +++ b/src/main/java/org/openapitools/client/model/SoleProprietorshipNumberOfEmployees.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/SourceOfFunds.java b/src/main/java/org/openapitools/client/model/SourceOfFunds.java index 965ceb54..6ee311f5 100644 --- a/src/main/java/org/openapitools/client/model/SourceOfFunds.java +++ b/src/main/java/org/openapitools/client/model/SourceOfFunds.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/SourceOfIncome.java b/src/main/java/org/openapitools/client/model/SourceOfIncome.java index 8f4007d6..4431deed 100644 --- a/src/main/java/org/openapitools/client/model/SourceOfIncome.java +++ b/src/main/java/org/openapitools/client/model/SourceOfIncome.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/SponsoredInterestTransaction.java b/src/main/java/org/openapitools/client/model/SponsoredInterestTransaction.java index 80399e4a..d141d611 100644 --- a/src/main/java/org/openapitools/client/model/SponsoredInterestTransaction.java +++ b/src/main/java/org/openapitools/client/model/SponsoredInterestTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Statement.java b/src/main/java/org/openapitools/client/model/Statement.java index 920eec8f..573666c3 100644 --- a/src/main/java/org/openapitools/client/model/Statement.java +++ b/src/main/java/org/openapitools/client/model/Statement.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StatementAttributes.java b/src/main/java/org/openapitools/client/model/StatementAttributes.java index 006fb8a8..4ed25c5f 100644 --- a/src/main/java/org/openapitools/client/model/StatementAttributes.java +++ b/src/main/java/org/openapitools/client/model/StatementAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StatementRelationships.java b/src/main/java/org/openapitools/client/model/StatementRelationships.java index b66addcc..b2f43977 100644 --- a/src/main/java/org/openapitools/client/model/StatementRelationships.java +++ b/src/main/java/org/openapitools/client/model/StatementRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StatusEvent.java b/src/main/java/org/openapitools/client/model/StatusEvent.java index 4d1c447d..9c454483 100644 --- a/src/main/java/org/openapitools/client/model/StatusEvent.java +++ b/src/main/java/org/openapitools/client/model/StatusEvent.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StatusEventStatus.java b/src/main/java/org/openapitools/client/model/StatusEventStatus.java index 488a4f4c..3fd5ecc9 100644 --- a/src/main/java/org/openapitools/client/model/StatusEventStatus.java +++ b/src/main/java/org/openapitools/client/model/StatusEventStatus.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StopPayment.java b/src/main/java/org/openapitools/client/model/StopPayment.java index 35561dbc..a1020147 100644 --- a/src/main/java/org/openapitools/client/model/StopPayment.java +++ b/src/main/java/org/openapitools/client/model/StopPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StopPaymentAttributes.java b/src/main/java/org/openapitools/client/model/StopPaymentAttributes.java index 6d38f27d..7a4defa0 100644 --- a/src/main/java/org/openapitools/client/model/StopPaymentAttributes.java +++ b/src/main/java/org/openapitools/client/model/StopPaymentAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StopPaymentListResponse.java b/src/main/java/org/openapitools/client/model/StopPaymentListResponse.java index 623a0819..f2b30678 100644 --- a/src/main/java/org/openapitools/client/model/StopPaymentListResponse.java +++ b/src/main/java/org/openapitools/client/model/StopPaymentListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StopPaymentRelationships.java b/src/main/java/org/openapitools/client/model/StopPaymentRelationships.java index 95c73250..51a7ea6d 100644 --- a/src/main/java/org/openapitools/client/model/StopPaymentRelationships.java +++ b/src/main/java/org/openapitools/client/model/StopPaymentRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPayments.java b/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPayments.java index c3895d62..d68adcac 100644 --- a/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPayments.java +++ b/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPayments.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPaymentsDataInner.java b/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPaymentsDataInner.java index 093445b1..61b852e4 100644 --- a/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPaymentsDataInner.java +++ b/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPaymentsDataInner.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/StopPaymentRequest.java b/src/main/java/org/openapitools/client/model/StopPaymentRequest.java deleted file mode 100644 index 233da428..00000000 --- a/src/main/java/org/openapitools/client/model/StopPaymentRequest.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StopPaymentRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopPaymentRequest { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private BigDecimal amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public StopPaymentRequest() { - } - - public StopPaymentRequest accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nonnull - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public StopPaymentRequest amount(BigDecimal amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public BigDecimal getAmount() { - return amount; - } - - - public void setAmount(BigDecimal amount) { - this.amount = amount; - } - - - public StopPaymentRequest description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopPaymentRequest stopPaymentRequest = (StopPaymentRequest) o; - return Objects.equals(this.accountId, stopPaymentRequest.accountId) && - Objects.equals(this.amount, stopPaymentRequest.amount) && - Objects.equals(this.description, stopPaymentRequest.description); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, amount, description); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopPaymentRequest {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account_id"); - openapiFields.add("amount"); - openapiFields.add("description"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account_id"); - openapiRequiredFields.add("amount"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StopPaymentRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StopPaymentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StopPaymentRequest is not found in the empty JSON string", StopPaymentRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StopPaymentRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StopPaymentRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StopPaymentRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("account_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `account_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_id").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopPaymentRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopPaymentRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StopPaymentRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StopPaymentRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopPaymentRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StopPaymentRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopPaymentRequest - * @throws IOException if the JSON string is invalid with respect to StopPaymentRequest - */ - public static StopPaymentRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopPaymentRequest.class); - } - - /** - * Convert an instance of StopPaymentRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StopPaymentResponse.java b/src/main/java/org/openapitools/client/model/StopPaymentResponse.java index 72499e54..694a96ae 100644 --- a/src/main/java/org/openapitools/client/model/StopPaymentResponse.java +++ b/src/main/java/org/openapitools/client/model/StopPaymentResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Transaction.java b/src/main/java/org/openapitools/client/model/Transaction.java index 6fbb1353..190ca09f 100644 --- a/src/main/java/org/openapitools/client/model/Transaction.java +++ b/src/main/java/org/openapitools/client/model/Transaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/TransactionRelationship.java b/src/main/java/org/openapitools/client/model/TransactionRelationship.java index d38d4001..deb9c323 100644 --- a/src/main/java/org/openapitools/client/model/TransactionRelationship.java +++ b/src/main/java/org/openapitools/client/model/TransactionRelationship.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/TransactionRelationships.java b/src/main/java/org/openapitools/client/model/TransactionRelationships.java index c6c51327..b1e52377 100644 --- a/src/main/java/org/openapitools/client/model/TransactionRelationships.java +++ b/src/main/java/org/openapitools/client/model/TransactionRelationships.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/TrustApplication.java b/src/main/java/org/openapitools/client/model/TrustApplication.java index a43afa89..f8f54189 100644 --- a/src/main/java/org/openapitools/client/model/TrustApplication.java +++ b/src/main/java/org/openapitools/client/model/TrustApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/TrustApplicationAllOfAttributes.java b/src/main/java/org/openapitools/client/model/TrustApplicationAllOfAttributes.java index a6989cc8..0290de23 100644 --- a/src/main/java/org/openapitools/client/model/TrustApplicationAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/TrustApplicationAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/TrustContact.java b/src/main/java/org/openapitools/client/model/TrustContact.java index 10bb595f..c642f23a 100644 --- a/src/main/java/org/openapitools/client/model/TrustContact.java +++ b/src/main/java/org/openapitools/client/model/TrustContact.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/TrustCustomer.java b/src/main/java/org/openapitools/client/model/TrustCustomer.java index 71bb133e..762dee42 100644 --- a/src/main/java/org/openapitools/client/model/TrustCustomer.java +++ b/src/main/java/org/openapitools/client/model/TrustCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/TrustCustomerAllOfAttributes.java b/src/main/java/org/openapitools/client/model/TrustCustomerAllOfAttributes.java index 6e6d1dcd..e92e6ad6 100644 --- a/src/main/java/org/openapitools/client/model/TrustCustomerAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/TrustCustomerAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Trustee.java b/src/main/java/org/openapitools/client/model/Trustee.java index bdf80491..4e55220b 100644 --- a/src/main/java/org/openapitools/client/model/Trustee.java +++ b/src/main/java/org/openapitools/client/model/Trustee.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitAccountResponse.java b/src/main/java/org/openapitools/client/model/UnitAccountResponse.java index f5b387cd..8d264f69 100644 --- a/src/main/java/org/openapitools/client/model/UnitAccountResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitAccountResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitAccountResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitAccountResponseWithIncluded.java index 9549b703..c8bb4245 100644 --- a/src/main/java/org/openapitools/client/model/UnitAccountResponseWithIncluded.java +++ b/src/main/java/org/openapitools/client/model/UnitAccountResponseWithIncluded.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitAccountsListResponse.java b/src/main/java/org/openapitools/client/model/UnitAccountsListResponse.java index 24bf65b8..9ce183be 100644 --- a/src/main/java/org/openapitools/client/model/UnitAccountsListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitAccountsListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitApiTokenResponse.java b/src/main/java/org/openapitools/client/model/UnitApiTokenResponse.java index 2f2096b2..2740744d 100644 --- a/src/main/java/org/openapitools/client/model/UnitApiTokenResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitApiTokenResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -152,6 +152,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ApiToken.validateJsonElement(jsonObj.get("data")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/UnitApplicationFormResponse.java b/src/main/java/org/openapitools/client/model/UnitApplicationFormResponse.java index 5a419af8..7ead45d7 100644 --- a/src/main/java/org/openapitools/client/model/UnitApplicationFormResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitApplicationFormResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitApplicationFormResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitApplicationFormResponseWithIncluded.java index de5887fd..caced348 100644 --- a/src/main/java/org/openapitools/client/model/UnitApplicationFormResponseWithIncluded.java +++ b/src/main/java/org/openapitools/client/model/UnitApplicationFormResponseWithIncluded.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitApplicationFormsListResponse.java b/src/main/java/org/openapitools/client/model/UnitApplicationFormsListResponse.java index 789ab8dd..287bb53b 100644 --- a/src/main/java/org/openapitools/client/model/UnitApplicationFormsListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitApplicationFormsListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitApplicationResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitApplicationResponseWithIncluded.java index 1805bbdb..bd667701 100644 --- a/src/main/java/org/openapitools/client/model/UnitApplicationResponseWithIncluded.java +++ b/src/main/java/org/openapitools/client/model/UnitApplicationResponseWithIncluded.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestResponse.java b/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestResponse.java index f360a37a..de8772bf 100644 --- a/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestsResponse.java b/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestsResponse.java index 3cf06c72..3170d712 100644 --- a/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestsResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestsResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitAuthorizationResponse.java b/src/main/java/org/openapitools/client/model/UnitAuthorizationResponse.java index 6ea51ba1..7985c4f1 100644 --- a/src/main/java/org/openapitools/client/model/UnitAuthorizationResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitAuthorizationResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCancelApplicationResponse.java b/src/main/java/org/openapitools/client/model/UnitCancelApplicationResponse.java index f5d696b1..1f35dae0 100644 --- a/src/main/java/org/openapitools/client/model/UnitCancelApplicationResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCancelApplicationResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponse.java b/src/main/java/org/openapitools/client/model/UnitCardResponse.java index 71e21203..657e506c 100644 --- a/src/main/java/org/openapitools/client/model/UnitCardResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCardResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponse1.java b/src/main/java/org/openapitools/client/model/UnitCardResponse1.java index 7e69c412..b75f5081 100644 --- a/src/main/java/org/openapitools/client/model/UnitCardResponse1.java +++ b/src/main/java/org/openapitools/client/model/UnitCardResponse1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponse2.java b/src/main/java/org/openapitools/client/model/UnitCardResponse2.java index aa02f330..30f77ac2 100644 --- a/src/main/java/org/openapitools/client/model/UnitCardResponse2.java +++ b/src/main/java/org/openapitools/client/model/UnitCardResponse2.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponse3.java b/src/main/java/org/openapitools/client/model/UnitCardResponse3.java index 64826e69..3571e03d 100644 --- a/src/main/java/org/openapitools/client/model/UnitCardResponse3.java +++ b/src/main/java/org/openapitools/client/model/UnitCardResponse3.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponseCardsList.java b/src/main/java/org/openapitools/client/model/UnitCardResponseCardsList.java index a154f014..45d21f47 100644 --- a/src/main/java/org/openapitools/client/model/UnitCardResponseCardsList.java +++ b/src/main/java/org/openapitools/client/model/UnitCardResponseCardsList.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse.java b/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse.java index 935be366..e54295e9 100644 --- a/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse1.java b/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse1.java index 6634fdf3..bfc7fda9 100644 --- a/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse1.java +++ b/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCheckPaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitCheckPaymentResponse.java index 6a71935a..b910ce39 100644 --- a/src/main/java/org/openapitools/client/model/UnitCheckPaymentResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCheckPaymentResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCounterpartiesListResponse.java b/src/main/java/org/openapitools/client/model/UnitCounterpartiesListResponse.java index 8866c6b8..f801f770 100644 --- a/src/main/java/org/openapitools/client/model/UnitCounterpartiesListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCounterpartiesListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse.java b/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse.java index 2a758dc3..2b8298c9 100644 --- a/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse1.java b/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse1.java index 630ac66a..a0609983 100644 --- a/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse1.java +++ b/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCreateApplicationResponse.java b/src/main/java/org/openapitools/client/model/UnitCreateApplicationResponse.java index 411355b4..cc721376 100644 --- a/src/main/java/org/openapitools/client/model/UnitCreateApplicationResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCreateApplicationResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCustomerResponse.java b/src/main/java/org/openapitools/client/model/UnitCustomerResponse.java index 6884cd22..c53b7a06 100644 --- a/src/main/java/org/openapitools/client/model/UnitCustomerResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCustomerResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCustomerTokenResponse.java b/src/main/java/org/openapitools/client/model/UnitCustomerTokenResponse.java index b4447d2f..e5bb2454 100644 --- a/src/main/java/org/openapitools/client/model/UnitCustomerTokenResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCustomerTokenResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCustomerTokenVerificationResponse.java b/src/main/java/org/openapitools/client/model/UnitCustomerTokenVerificationResponse.java index 59e43ae5..3325887f 100644 --- a/src/main/java/org/openapitools/client/model/UnitCustomerTokenVerificationResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCustomerTokenVerificationResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitCustomersListResponse.java b/src/main/java/org/openapitools/client/model/UnitCustomersListResponse.java index e613fab3..b50717e7 100644 --- a/src/main/java/org/openapitools/client/model/UnitCustomersListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitCustomersListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitDisputeResponse.java b/src/main/java/org/openapitools/client/model/UnitDisputeResponse.java index ad2af87b..2374bcc6 100644 --- a/src/main/java/org/openapitools/client/model/UnitDisputeResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitDisputeResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitDocumentResponse.java b/src/main/java/org/openapitools/client/model/UnitDocumentResponse.java index 508f438b..cdfa5561 100644 --- a/src/main/java/org/openapitools/client/model/UnitDocumentResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitDocumentResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitEventListResponse.java b/src/main/java/org/openapitools/client/model/UnitEventListResponse.java index bdfbe6f8..04138d1c 100644 --- a/src/main/java/org/openapitools/client/model/UnitEventListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitEventListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitEventResponse.java b/src/main/java/org/openapitools/client/model/UnitEventResponse.java index 54894403..b385660a 100644 --- a/src/main/java/org/openapitools/client/model/UnitEventResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitEventResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitEventResponse1.java b/src/main/java/org/openapitools/client/model/UnitEventResponse1.java index b77e56b2..9700a187 100644 --- a/src/main/java/org/openapitools/client/model/UnitEventResponse1.java +++ b/src/main/java/org/openapitools/client/model/UnitEventResponse1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitFeeResponse.java b/src/main/java/org/openapitools/client/model/UnitFeeResponse.java index 853a6b88..2b56e38b 100644 --- a/src/main/java/org/openapitools/client/model/UnitFeeResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitFeeResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitGetAccountEndOfDayListResponse.java b/src/main/java/org/openapitools/client/model/UnitGetAccountEndOfDayListResponse.java index 7a5eb0e9..d8d10981 100644 --- a/src/main/java/org/openapitools/client/model/UnitGetAccountEndOfDayListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitGetAccountEndOfDayListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitGetAccountLimitsResponse.java b/src/main/java/org/openapitools/client/model/UnitGetAccountLimitsResponse.java index 009fac08..93e738eb 100644 --- a/src/main/java/org/openapitools/client/model/UnitGetAccountLimitsResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitGetAccountLimitsResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitInstitutionResponse.java b/src/main/java/org/openapitools/client/model/UnitInstitutionResponse.java index bc04a686..03fea6bf 100644 --- a/src/main/java/org/openapitools/client/model/UnitInstitutionResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitInstitutionResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitListApplicationsResponse.java b/src/main/java/org/openapitools/client/model/UnitListApplicationsResponse.java index 7c63fa1a..9df33823 100644 --- a/src/main/java/org/openapitools/client/model/UnitListApplicationsResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitListApplicationsResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Execute200Response2.java b/src/main/java/org/openapitools/client/model/UnitListAuthorizationRequestsResponse.java similarity index 70% rename from src/main/java/org/openapitools/client/model/Execute200Response2.java rename to src/main/java/org/openapitools/client/model/UnitListAuthorizationRequestsResponse.java index 3f710f3a..d5faa8e5 100644 --- a/src/main/java/org/openapitools/client/model/Execute200Response2.java +++ b/src/main/java/org/openapitools/client/model/UnitListAuthorizationRequestsResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,24 +50,24 @@ import org.openapitools.client.JSON; /** - * Execute200Response2 + * UnitListAuthorizationRequestsResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Execute200Response2 { +public class UnitListAuthorizationRequestsResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) private List data; - public Execute200Response2() { + public UnitListAuthorizationRequestsResponse() { } - public Execute200Response2 data(List data) { + public UnitListAuthorizationRequestsResponse data(List data) { this.data = data; return this; } - public Execute200Response2 addDataItem(AuthorizationRequest dataItem) { + public UnitListAuthorizationRequestsResponse addDataItem(AuthorizationRequest dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -99,8 +99,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Execute200Response2 execute200Response2 = (Execute200Response2) o; - return Objects.equals(this.data, execute200Response2.data); + UnitListAuthorizationRequestsResponse unitListAuthorizationRequestsResponse = (UnitListAuthorizationRequestsResponse) o; + return Objects.equals(this.data, unitListAuthorizationRequestsResponse.data); } @Override @@ -111,7 +111,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Execute200Response2 {\n"); + sb.append("class UnitListAuthorizationRequestsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -145,20 +145,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Execute200Response2 + * @throws IOException if the JSON Element is invalid with respect to UnitListAuthorizationRequestsResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!Execute200Response2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Execute200Response2 is not found in the empty JSON string", Execute200Response2.openapiRequiredFields.toString())); + if (!UnitListAuthorizationRequestsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListAuthorizationRequestsResponse is not found in the empty JSON string", UnitListAuthorizationRequestsResponse.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!Execute200Response2.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Execute200Response2` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!UnitListAuthorizationRequestsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListAuthorizationRequestsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -182,22 +182,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Execute200Response2.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Execute200Response2' and its subtypes + if (!UnitListAuthorizationRequestsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnitListAuthorizationRequestsResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Execute200Response2.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UnitListAuthorizationRequestsResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Execute200Response2 value) throws IOException { + public void write(JsonWriter out, UnitListAuthorizationRequestsResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public Execute200Response2 read(JsonReader in) throws IOException { + public UnitListAuthorizationRequestsResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -208,18 +208,18 @@ public Execute200Response2 read(JsonReader in) throws IOException { } /** - * Create an instance of Execute200Response2 given an JSON string + * Create an instance of UnitListAuthorizationRequestsResponse given an JSON string * * @param jsonString JSON string - * @return An instance of Execute200Response2 - * @throws IOException if the JSON string is invalid with respect to Execute200Response2 + * @return An instance of UnitListAuthorizationRequestsResponse + * @throws IOException if the JSON string is invalid with respect to UnitListAuthorizationRequestsResponse */ - public static Execute200Response2 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Execute200Response2.class); + public static UnitListAuthorizationRequestsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnitListAuthorizationRequestsResponse.class); } /** - * Convert an instance of Execute200Response2 to an JSON string + * Convert an instance of UnitListAuthorizationRequestsResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/Execute200Response1.java b/src/main/java/org/openapitools/client/model/UnitListAuthorizationsResponse.java similarity index 72% rename from src/main/java/org/openapitools/client/model/Execute200Response1.java rename to src/main/java/org/openapitools/client/model/UnitListAuthorizationsResponse.java index a9c155f9..038fe573 100644 --- a/src/main/java/org/openapitools/client/model/Execute200Response1.java +++ b/src/main/java/org/openapitools/client/model/UnitListAuthorizationsResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,24 +50,24 @@ import org.openapitools.client.JSON; /** - * Execute200Response1 + * UnitListAuthorizationsResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Execute200Response1 { +public class UnitListAuthorizationsResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) private List data; - public Execute200Response1() { + public UnitListAuthorizationsResponse() { } - public Execute200Response1 data(List data) { + public UnitListAuthorizationsResponse data(List data) { this.data = data; return this; } - public Execute200Response1 addDataItem(Authorization dataItem) { + public UnitListAuthorizationsResponse addDataItem(Authorization dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -99,8 +99,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Execute200Response1 execute200Response1 = (Execute200Response1) o; - return Objects.equals(this.data, execute200Response1.data); + UnitListAuthorizationsResponse unitListAuthorizationsResponse = (UnitListAuthorizationsResponse) o; + return Objects.equals(this.data, unitListAuthorizationsResponse.data); } @Override @@ -111,7 +111,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Execute200Response1 {\n"); + sb.append("class UnitListAuthorizationsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -145,20 +145,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Execute200Response1 + * @throws IOException if the JSON Element is invalid with respect to UnitListAuthorizationsResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!Execute200Response1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Execute200Response1 is not found in the empty JSON string", Execute200Response1.openapiRequiredFields.toString())); + if (!UnitListAuthorizationsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListAuthorizationsResponse is not found in the empty JSON string", UnitListAuthorizationsResponse.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!Execute200Response1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Execute200Response1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!UnitListAuthorizationsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListAuthorizationsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -182,22 +182,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Execute200Response1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Execute200Response1' and its subtypes + if (!UnitListAuthorizationsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnitListAuthorizationsResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Execute200Response1.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UnitListAuthorizationsResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Execute200Response1 value) throws IOException { + public void write(JsonWriter out, UnitListAuthorizationsResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public Execute200Response1 read(JsonReader in) throws IOException { + public UnitListAuthorizationsResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -208,18 +208,18 @@ public Execute200Response1 read(JsonReader in) throws IOException { } /** - * Create an instance of Execute200Response1 given an JSON string + * Create an instance of UnitListAuthorizationsResponse given an JSON string * * @param jsonString JSON string - * @return An instance of Execute200Response1 - * @throws IOException if the JSON string is invalid with respect to Execute200Response1 + * @return An instance of UnitListAuthorizationsResponse + * @throws IOException if the JSON string is invalid with respect to UnitListAuthorizationsResponse */ - public static Execute200Response1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Execute200Response1.class); + public static UnitListAuthorizationsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnitListAuthorizationsResponse.class); } /** - * Convert an instance of Execute200Response1 to an JSON string + * Convert an instance of UnitListAuthorizationsResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/UnitListCheckDepositsResponse.java b/src/main/java/org/openapitools/client/model/UnitListCheckDepositsResponse.java new file mode 100644 index 00000000..8b2df1b7 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/UnitListCheckDepositsResponse.java @@ -0,0 +1,230 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.CheckDeposit; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * UnitListCheckDepositsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitListCheckDepositsResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data; + + public UnitListCheckDepositsResponse() { + } + + public UnitListCheckDepositsResponse data(List data) { + + this.data = data; + return this; + } + + public UnitListCheckDepositsResponse addDataItem(CheckDeposit dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitListCheckDepositsResponse unitListCheckDepositsResponse = (UnitListCheckDepositsResponse) o; + return Objects.equals(this.data, unitListCheckDepositsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitListCheckDepositsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UnitListCheckDepositsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UnitListCheckDepositsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListCheckDepositsResponse is not found in the empty JSON string", UnitListCheckDepositsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UnitListCheckDepositsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListCheckDepositsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + CheckDeposit.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UnitListCheckDepositsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnitListCheckDepositsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UnitListCheckDepositsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UnitListCheckDepositsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UnitListCheckDepositsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UnitListCheckDepositsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnitListCheckDepositsResponse + * @throws IOException if the JSON string is invalid with respect to UnitListCheckDepositsResponse + */ + public static UnitListCheckDepositsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnitListCheckDepositsResponse.class); + } + + /** + * Convert an instance of UnitListCheckDepositsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/Execute200Response3.java b/src/main/java/org/openapitools/client/model/UnitListCheckPaymentsResponse.java similarity index 72% rename from src/main/java/org/openapitools/client/model/Execute200Response3.java rename to src/main/java/org/openapitools/client/model/UnitListCheckPaymentsResponse.java index 5a852e8f..a405a2cb 100644 --- a/src/main/java/org/openapitools/client/model/Execute200Response3.java +++ b/src/main/java/org/openapitools/client/model/UnitListCheckPaymentsResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,24 +50,24 @@ import org.openapitools.client.JSON; /** - * Execute200Response3 + * UnitListCheckPaymentsResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Execute200Response3 { +public class UnitListCheckPaymentsResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) private List data; - public Execute200Response3() { + public UnitListCheckPaymentsResponse() { } - public Execute200Response3 data(List data) { + public UnitListCheckPaymentsResponse data(List data) { this.data = data; return this; } - public Execute200Response3 addDataItem(CheckPayment dataItem) { + public UnitListCheckPaymentsResponse addDataItem(CheckPayment dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -99,8 +99,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Execute200Response3 execute200Response3 = (Execute200Response3) o; - return Objects.equals(this.data, execute200Response3.data); + UnitListCheckPaymentsResponse unitListCheckPaymentsResponse = (UnitListCheckPaymentsResponse) o; + return Objects.equals(this.data, unitListCheckPaymentsResponse.data); } @Override @@ -111,7 +111,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Execute200Response3 {\n"); + sb.append("class UnitListCheckPaymentsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -145,20 +145,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Execute200Response3 + * @throws IOException if the JSON Element is invalid with respect to UnitListCheckPaymentsResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!Execute200Response3.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Execute200Response3 is not found in the empty JSON string", Execute200Response3.openapiRequiredFields.toString())); + if (!UnitListCheckPaymentsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListCheckPaymentsResponse is not found in the empty JSON string", UnitListCheckPaymentsResponse.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!Execute200Response3.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Execute200Response3` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!UnitListCheckPaymentsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListCheckPaymentsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -182,22 +182,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Execute200Response3.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Execute200Response3' and its subtypes + if (!UnitListCheckPaymentsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnitListCheckPaymentsResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Execute200Response3.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UnitListCheckPaymentsResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Execute200Response3 value) throws IOException { + public void write(JsonWriter out, UnitListCheckPaymentsResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public Execute200Response3 read(JsonReader in) throws IOException { + public UnitListCheckPaymentsResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -208,18 +208,18 @@ public Execute200Response3 read(JsonReader in) throws IOException { } /** - * Create an instance of Execute200Response3 given an JSON string + * Create an instance of UnitListCheckPaymentsResponse given an JSON string * * @param jsonString JSON string - * @return An instance of Execute200Response3 - * @throws IOException if the JSON string is invalid with respect to Execute200Response3 + * @return An instance of UnitListCheckPaymentsResponse + * @throws IOException if the JSON string is invalid with respect to UnitListCheckPaymentsResponse */ - public static Execute200Response3 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Execute200Response3.class); + public static UnitListCheckPaymentsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnitListCheckPaymentsResponse.class); } /** - * Convert an instance of Execute200Response3 to an JSON string + * Convert an instance of UnitListCheckPaymentsResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/Execute200Response.java b/src/main/java/org/openapitools/client/model/UnitListDocumentsResponse.java similarity index 73% rename from src/main/java/org/openapitools/client/model/Execute200Response.java rename to src/main/java/org/openapitools/client/model/UnitListDocumentsResponse.java index 3e78d964..9012615b 100644 --- a/src/main/java/org/openapitools/client/model/Execute200Response.java +++ b/src/main/java/org/openapitools/client/model/UnitListDocumentsResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,24 +50,24 @@ import org.openapitools.client.JSON; /** - * Execute200Response + * UnitListDocumentsResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Execute200Response { +public class UnitListDocumentsResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) private List data; - public Execute200Response() { + public UnitListDocumentsResponse() { } - public Execute200Response data(List data) { + public UnitListDocumentsResponse data(List data) { this.data = data; return this; } - public Execute200Response addDataItem(Document dataItem) { + public UnitListDocumentsResponse addDataItem(Document dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -99,8 +99,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Execute200Response execute200Response = (Execute200Response) o; - return Objects.equals(this.data, execute200Response.data); + UnitListDocumentsResponse unitListDocumentsResponse = (UnitListDocumentsResponse) o; + return Objects.equals(this.data, unitListDocumentsResponse.data); } @Override @@ -111,7 +111,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Execute200Response {\n"); + sb.append("class UnitListDocumentsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -145,20 +145,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Execute200Response + * @throws IOException if the JSON Element is invalid with respect to UnitListDocumentsResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!Execute200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Execute200Response is not found in the empty JSON string", Execute200Response.openapiRequiredFields.toString())); + if (!UnitListDocumentsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListDocumentsResponse is not found in the empty JSON string", UnitListDocumentsResponse.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!Execute200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Execute200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!UnitListDocumentsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListDocumentsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -182,22 +182,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Execute200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Execute200Response' and its subtypes + if (!UnitListDocumentsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnitListDocumentsResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Execute200Response.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UnitListDocumentsResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Execute200Response value) throws IOException { + public void write(JsonWriter out, UnitListDocumentsResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public Execute200Response read(JsonReader in) throws IOException { + public UnitListDocumentsResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -208,18 +208,18 @@ public Execute200Response read(JsonReader in) throws IOException { } /** - * Create an instance of Execute200Response given an JSON string + * Create an instance of UnitListDocumentsResponse given an JSON string * * @param jsonString JSON string - * @return An instance of Execute200Response - * @throws IOException if the JSON string is invalid with respect to Execute200Response + * @return An instance of UnitListDocumentsResponse + * @throws IOException if the JSON string is invalid with respect to UnitListDocumentsResponse */ - public static Execute200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Execute200Response.class); + public static UnitListDocumentsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnitListDocumentsResponse.class); } /** - * Convert an instance of Execute200Response to an JSON string + * Convert an instance of UnitListDocumentsResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/UnitOrgApiTokensListResponse.java b/src/main/java/org/openapitools/client/model/UnitOrgApiTokensListResponse.java index cbb8fd83..e6346167 100644 --- a/src/main/java/org/openapitools/client/model/UnitOrgApiTokensListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitOrgApiTokensListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -162,9 +162,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull() && !jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ApiToken.validateJsonElement(jsonArraydata.get(i)); + }; + } } } diff --git a/src/main/java/org/openapitools/client/model/UnitPaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitPaymentResponse.java index d6b65374..80af107f 100644 --- a/src/main/java/org/openapitools/client/model/UnitPaymentResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitPaymentResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitPaymentResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitPaymentResponseWithIncluded.java index 12428202..03dfe83a 100644 --- a/src/main/java/org/openapitools/client/model/UnitPaymentResponseWithIncluded.java +++ b/src/main/java/org/openapitools/client/model/UnitPaymentResponseWithIncluded.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitPaymentsListResponse.java b/src/main/java/org/openapitools/client/model/UnitPaymentsListResponse.java index 143ae507..c2482411 100644 --- a/src/main/java/org/openapitools/client/model/UnitPaymentsListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitPaymentsListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentListResponse.java b/src/main/java/org/openapitools/client/model/UnitReceivedPaymentListResponse.java index 50f54a54..dd3d59f2 100644 --- a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitReceivedPaymentListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponse.java index 1701dc7c..222cc1c6 100644 --- a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponseWithIncluded.java index cd8fa403..e48995a6 100644 --- a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponseWithIncluded.java +++ b/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponseWithIncluded.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitRecurringPaymentListResponse.java b/src/main/java/org/openapitools/client/model/UnitRecurringPaymentListResponse.java index 5242085d..5521f921 100644 --- a/src/main/java/org/openapitools/client/model/UnitRecurringPaymentListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitRecurringPaymentListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitRecurringPaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitRecurringPaymentResponse.java index 5922113f..5ac9c4f2 100644 --- a/src/main/java/org/openapitools/client/model/UnitRecurringPaymentResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitRecurringPaymentResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitRepaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitRepaymentResponse.java index dee31d5e..75c183c7 100644 --- a/src/main/java/org/openapitools/client/model/UnitRepaymentResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitRepaymentResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitRepaymentsListResponse.java b/src/main/java/org/openapitools/client/model/UnitRepaymentsListResponse.java index 66a13d8e..5b55fa03 100644 --- a/src/main/java/org/openapitools/client/model/UnitRepaymentsListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitRepaymentsListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitRewardResponse.java b/src/main/java/org/openapitools/client/model/UnitRewardResponse.java index 50ea6cf0..3a8fa9e8 100644 --- a/src/main/java/org/openapitools/client/model/UnitRewardResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitRewardResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitRewardsListResponse.java b/src/main/java/org/openapitools/client/model/UnitRewardsListResponse.java index cac849f8..c1b0bab0 100644 --- a/src/main/java/org/openapitools/client/model/UnitRewardsListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitRewardsListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitStatementsResponse.java b/src/main/java/org/openapitools/client/model/UnitStatementsResponse.java index 833fd439..64678d61 100644 --- a/src/main/java/org/openapitools/client/model/UnitStatementsResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitStatementsResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitTransactionResponse.java b/src/main/java/org/openapitools/client/model/UnitTransactionResponse.java index 1cb7fcc6..18ca3510 100644 --- a/src/main/java/org/openapitools/client/model/UnitTransactionResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitTransactionResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitTransactionResponse1.java b/src/main/java/org/openapitools/client/model/UnitTransactionResponse1.java index ec189cab..74bdc5d7 100644 --- a/src/main/java/org/openapitools/client/model/UnitTransactionResponse1.java +++ b/src/main/java/org/openapitools/client/model/UnitTransactionResponse1.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitTransactionsListResponse.java b/src/main/java/org/openapitools/client/model/UnitTransactionsListResponse.java index 08ec993c..67009da9 100644 --- a/src/main/java/org/openapitools/client/model/UnitTransactionsListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitTransactionsListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitWebhookResponse.java b/src/main/java/org/openapitools/client/model/UnitWebhookResponse.java index 0e7e81ec..a9007a2f 100644 --- a/src/main/java/org/openapitools/client/model/UnitWebhookResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitWebhookResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UnitWebhooksListResponse.java b/src/main/java/org/openapitools/client/model/UnitWebhooksListResponse.java index c27a9d87..3cb90a14 100644 --- a/src/main/java/org/openapitools/client/model/UnitWebhooksListResponse.java +++ b/src/main/java/org/openapitools/client/model/UnitWebhooksListResponse.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateApplication.java b/src/main/java/org/openapitools/client/model/UpdateApplication.java index 17f9285b..e7599d19 100644 --- a/src/main/java/org/openapitools/client/model/UpdateApplication.java +++ b/src/main/java/org/openapitools/client/model/UpdateApplication.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateApplicationData.java b/src/main/java/org/openapitools/client/model/UpdateApplicationData.java index b194c642..e5e412e5 100644 --- a/src/main/java/org/openapitools/client/model/UpdateApplicationData.java +++ b/src/main/java/org/openapitools/client/model/UpdateApplicationData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,7 +22,10 @@ import java.io.IOException; import java.util.Arrays; import org.openapitools.client.model.PatchBusinessApplication; +import org.openapitools.client.model.PatchBusinessApplicationBeneficialOwner; +import org.openapitools.client.model.PatchBusinessApplicationOfficer; import org.openapitools.client.model.PatchIndividualApplication; +import org.openapitools.client.model.PatchSoleProprietorApplication; import org.openapitools.client.model.PatchTrustApplication; import org.openapitools.client.model.PatchTrustApplicationAttributes; @@ -74,6 +77,9 @@ public TypeAdapter create(Gson gson, TypeToken type) { } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter adapterPatchBusinessApplication = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplication.class)); + final TypeAdapter adapterPatchBusinessApplicationOfficer = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationOfficer.class)); + final TypeAdapter adapterPatchBusinessApplicationBeneficialOwner = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationBeneficialOwner.class)); + final TypeAdapter adapterPatchSoleProprietorApplication = gson.getDelegateAdapter(this, TypeToken.get(PatchSoleProprietorApplication.class)); final TypeAdapter adapterPatchIndividualApplication = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualApplication.class)); final TypeAdapter adapterPatchTrustApplication = gson.getDelegateAdapter(this, TypeToken.get(PatchTrustApplication.class)); @@ -91,6 +97,24 @@ public void write(JsonWriter out, UpdateApplicationData value) throws IOExceptio elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `PatchBusinessApplicationOfficer` + if (value.getActualInstance() instanceof PatchBusinessApplicationOfficer) { + JsonElement element = adapterPatchBusinessApplicationOfficer.toJsonTree((PatchBusinessApplicationOfficer)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `PatchBusinessApplicationBeneficialOwner` + if (value.getActualInstance() instanceof PatchBusinessApplicationBeneficialOwner) { + JsonElement element = adapterPatchBusinessApplicationBeneficialOwner.toJsonTree((PatchBusinessApplicationBeneficialOwner)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `PatchSoleProprietorApplication` + if (value.getActualInstance() instanceof PatchSoleProprietorApplication) { + JsonElement element = adapterPatchSoleProprietorApplication.toJsonTree((PatchSoleProprietorApplication)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `PatchIndividualApplication` if (value.getActualInstance() instanceof PatchIndividualApplication) { JsonElement element = adapterPatchIndividualApplication.toJsonTree((PatchIndividualApplication)value.getActualInstance()); @@ -103,7 +127,7 @@ public void write(JsonWriter out, UpdateApplicationData value) throws IOExceptio elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: PatchBusinessApplication, PatchIndividualApplication, PatchTrustApplication"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication"); } @Override @@ -127,6 +151,42 @@ public UpdateApplicationData read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for PatchBusinessApplication failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'PatchBusinessApplication'", e); } + // deserialize PatchBusinessApplicationOfficer + try { + // validate the JSON object to see if any exception is thrown + PatchBusinessApplicationOfficer.validateJsonElement(jsonElement); + actualAdapter = adapterPatchBusinessApplicationOfficer; + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBusinessApplicationOfficer'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for PatchBusinessApplicationOfficer failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'PatchBusinessApplicationOfficer'", e); + } + // deserialize PatchBusinessApplicationBeneficialOwner + try { + // validate the JSON object to see if any exception is thrown + PatchBusinessApplicationBeneficialOwner.validateJsonElement(jsonElement); + actualAdapter = adapterPatchBusinessApplicationBeneficialOwner; + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBusinessApplicationBeneficialOwner'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for PatchBusinessApplicationBeneficialOwner failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'PatchBusinessApplicationBeneficialOwner'", e); + } + // deserialize PatchSoleProprietorApplication + try { + // validate the JSON object to see if any exception is thrown + PatchSoleProprietorApplication.validateJsonElement(jsonElement); + actualAdapter = adapterPatchSoleProprietorApplication; + match++; + log.log(Level.FINER, "Input data matches schema 'PatchSoleProprietorApplication'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for PatchSoleProprietorApplication failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'PatchSoleProprietorApplication'", e); + } // deserialize PatchIndividualApplication try { // validate the JSON object to see if any exception is thrown @@ -176,11 +236,26 @@ public UpdateApplicationData(PatchBusinessApplication o) { setActualInstance(o); } + public UpdateApplicationData(PatchBusinessApplicationBeneficialOwner o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateApplicationData(PatchBusinessApplicationOfficer o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public UpdateApplicationData(PatchIndividualApplication o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } + public UpdateApplicationData(PatchSoleProprietorApplication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public UpdateApplicationData(PatchTrustApplication o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -188,6 +263,9 @@ public UpdateApplicationData(PatchTrustApplication o) { static { schemas.put("PatchBusinessApplication", PatchBusinessApplication.class); + schemas.put("PatchBusinessApplicationOfficer", PatchBusinessApplicationOfficer.class); + schemas.put("PatchBusinessApplicationBeneficialOwner", PatchBusinessApplicationBeneficialOwner.class); + schemas.put("PatchSoleProprietorApplication", PatchSoleProprietorApplication.class); schemas.put("PatchIndividualApplication", PatchIndividualApplication.class); schemas.put("PatchTrustApplication", PatchTrustApplication.class); } @@ -200,7 +278,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * PatchBusinessApplication, PatchIndividualApplication, PatchTrustApplication + * PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication * * It could be an instance of the 'oneOf' schemas. */ @@ -211,6 +289,21 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof PatchBusinessApplicationOfficer) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof PatchBusinessApplicationBeneficialOwner) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof PatchSoleProprietorApplication) { + super.setActualInstance(instance); + return; + } + if (instance instanceof PatchIndividualApplication) { super.setActualInstance(instance); return; @@ -221,14 +314,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be PatchBusinessApplication, PatchIndividualApplication, PatchTrustApplication"); + throw new RuntimeException("Invalid instance type. Must be PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication"); } /** * Get the actual instance, which can be the following: - * PatchBusinessApplication, PatchIndividualApplication, PatchTrustApplication + * PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication * - * @return The actual instance (PatchBusinessApplication, PatchIndividualApplication, PatchTrustApplication) + * @return The actual instance (PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication) */ @Override public Object getActualInstance() { @@ -245,6 +338,36 @@ public Object getActualInstance() { public PatchBusinessApplication getPatchBusinessApplication() throws ClassCastException { return (PatchBusinessApplication)super.getActualInstance(); } + /** + * Get the actual instance of `PatchBusinessApplicationOfficer`. If the actual instance is not `PatchBusinessApplicationOfficer`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBusinessApplicationOfficer` + * @throws ClassCastException if the instance is not `PatchBusinessApplicationOfficer` + */ + public PatchBusinessApplicationOfficer getPatchBusinessApplicationOfficer() throws ClassCastException { + return (PatchBusinessApplicationOfficer)super.getActualInstance(); + } + /** + * Get the actual instance of `PatchBusinessApplicationBeneficialOwner`. If the actual instance is not `PatchBusinessApplicationBeneficialOwner`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBusinessApplicationBeneficialOwner` + * @throws ClassCastException if the instance is not `PatchBusinessApplicationBeneficialOwner` + */ + public PatchBusinessApplicationBeneficialOwner getPatchBusinessApplicationBeneficialOwner() throws ClassCastException { + return (PatchBusinessApplicationBeneficialOwner)super.getActualInstance(); + } + /** + * Get the actual instance of `PatchSoleProprietorApplication`. If the actual instance is not `PatchSoleProprietorApplication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchSoleProprietorApplication` + * @throws ClassCastException if the instance is not `PatchSoleProprietorApplication` + */ + public PatchSoleProprietorApplication getPatchSoleProprietorApplication() throws ClassCastException { + return (PatchSoleProprietorApplication)super.getActualInstance(); + } /** * Get the actual instance of `PatchIndividualApplication`. If the actual instance is not `PatchIndividualApplication`, * the ClassCastException will be thrown. @@ -284,6 +407,30 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for PatchBusinessApplication failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with PatchBusinessApplicationOfficer + try { + PatchBusinessApplicationOfficer.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for PatchBusinessApplicationOfficer failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with PatchBusinessApplicationBeneficialOwner + try { + PatchBusinessApplicationBeneficialOwner.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for PatchBusinessApplicationBeneficialOwner failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with PatchSoleProprietorApplication + try { + PatchSoleProprietorApplication.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for PatchSoleProprietorApplication failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with PatchIndividualApplication try { PatchIndividualApplication.validateJsonElement(jsonElement); @@ -301,7 +448,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for UpdateApplicationData with oneOf schemas: PatchBusinessApplication, PatchIndividualApplication, PatchTrustApplication. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for UpdateApplicationData with oneOf schemas: PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/org/openapitools/client/model/UpdateBusinessCustomer.java b/src/main/java/org/openapitools/client/model/UpdateBusinessCustomer.java index 4462852d..4159969d 100644 --- a/src/main/java/org/openapitools/client/model/UpdateBusinessCustomer.java +++ b/src/main/java/org/openapitools/client/model/UpdateBusinessCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateBusinessCustomerAttributes.java b/src/main/java/org/openapitools/client/model/UpdateBusinessCustomerAttributes.java index 5af9ad3f..69e8bd5a 100644 --- a/src/main/java/org/openapitools/client/model/UpdateBusinessCustomerAttributes.java +++ b/src/main/java/org/openapitools/client/model/UpdateBusinessCustomerAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateCard.java b/src/main/java/org/openapitools/client/model/UpdateCard.java index 93b4fec5..1e63ba2f 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCard.java +++ b/src/main/java/org/openapitools/client/model/UpdateCard.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateCardData.java b/src/main/java/org/openapitools/client/model/UpdateCardData.java index d8980b15..c7ebd4a7 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCardData.java +++ b/src/main/java/org/openapitools/client/model/UpdateCardData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateCheckDeposit.java b/src/main/java/org/openapitools/client/model/UpdateCheckDeposit.java index fea0e7e6..ea7cb26b 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCheckDeposit.java +++ b/src/main/java/org/openapitools/client/model/UpdateCheckDeposit.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateCounterparty.java b/src/main/java/org/openapitools/client/model/UpdateCounterparty.java index 38082e4a..37b740b9 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCounterparty.java +++ b/src/main/java/org/openapitools/client/model/UpdateCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateCounterpartyData.java b/src/main/java/org/openapitools/client/model/UpdateCounterpartyData.java index 74bf93c0..9d678945 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCounterpartyData.java +++ b/src/main/java/org/openapitools/client/model/UpdateCounterpartyData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateCreditAccount.java b/src/main/java/org/openapitools/client/model/UpdateCreditAccount.java index c72fa5c8..4bf69b38 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCreditAccount.java +++ b/src/main/java/org/openapitools/client/model/UpdateCreditAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateCreditAccountAttributes.java b/src/main/java/org/openapitools/client/model/UpdateCreditAccountAttributes.java index 0700ff61..35885b5f 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCreditAccountAttributes.java +++ b/src/main/java/org/openapitools/client/model/UpdateCreditAccountAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -55,9 +55,9 @@ public class UpdateCreditAccountAttributes { @SerializedName(SERIALIZED_NAME_TAGS) private Object tags; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; + public static final String SERIALIZED_NAME_CREDIT_LIMIT = "creditLimit"; + @SerializedName(SERIALIZED_NAME_CREDIT_LIMIT) + private Integer creditLimit; public UpdateCreditAccountAttributes() { } @@ -83,24 +83,24 @@ public void setTags(Object tags) { } - public UpdateCreditAccountAttributes name(String name) { + public UpdateCreditAccountAttributes creditLimit(Integer creditLimit) { - this.name = name; + this.creditLimit = creditLimit; return this; } /** - * Get name - * @return name + * Get creditLimit + * @return creditLimit **/ @javax.annotation.Nullable - public String getName() { - return name; + public Integer getCreditLimit() { + return creditLimit; } - public void setName(String name) { - this.name = name; + public void setCreditLimit(Integer creditLimit) { + this.creditLimit = creditLimit; } @@ -115,12 +115,12 @@ public boolean equals(Object o) { } UpdateCreditAccountAttributes updateCreditAccountAttributes = (UpdateCreditAccountAttributes) o; return Objects.equals(this.tags, updateCreditAccountAttributes.tags) && - Objects.equals(this.name, updateCreditAccountAttributes.name); + Objects.equals(this.creditLimit, updateCreditAccountAttributes.creditLimit); } @Override public int hashCode() { - return Objects.hash(tags, name); + return Objects.hash(tags, creditLimit); } @Override @@ -128,7 +128,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateCreditAccountAttributes {\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" creditLimit: ").append(toIndentedString(creditLimit)).append("\n"); sb.append("}"); return sb.toString(); } @@ -152,7 +152,7 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("tags"); - openapiFields.add("name"); + openapiFields.add("creditLimit"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -179,9 +179,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/UpdateCustomer.java b/src/main/java/org/openapitools/client/model/UpdateCustomer.java index cc103e93..5f2470ff 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCustomer.java +++ b/src/main/java/org/openapitools/client/model/UpdateCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateCustomerData.java b/src/main/java/org/openapitools/client/model/UpdateCustomerData.java index c1d6be2a..14be704c 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCustomerData.java +++ b/src/main/java/org/openapitools/client/model/UpdateCustomerData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateDepositAccount.java b/src/main/java/org/openapitools/client/model/UpdateDepositAccount.java index 87bac705..270c4443 100644 --- a/src/main/java/org/openapitools/client/model/UpdateDepositAccount.java +++ b/src/main/java/org/openapitools/client/model/UpdateDepositAccount.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateDepositAccountAttributes.java b/src/main/java/org/openapitools/client/model/UpdateDepositAccountAttributes.java index 1858516a..a8a908a1 100644 --- a/src/main/java/org/openapitools/client/model/UpdateDepositAccountAttributes.java +++ b/src/main/java/org/openapitools/client/model/UpdateDepositAccountAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -59,14 +59,6 @@ public class UpdateDepositAccountAttributes { @SerializedName(SERIALIZED_NAME_DEPOSIT_PRODUCT) private String depositProduct; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_OVERDRAFT_LIMIT = "overdraftLimit"; - @SerializedName(SERIALIZED_NAME_OVERDRAFT_LIMIT) - private Integer overdraftLimit; - public UpdateDepositAccountAttributes() { } @@ -112,49 +104,6 @@ public void setDepositProduct(String depositProduct) { } - public UpdateDepositAccountAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public UpdateDepositAccountAttributes overdraftLimit(Integer overdraftLimit) { - - this.overdraftLimit = overdraftLimit; - return this; - } - - /** - * Get overdraftLimit - * minimum: 0 - * @return overdraftLimit - **/ - @javax.annotation.Nullable - public Integer getOverdraftLimit() { - return overdraftLimit; - } - - - public void setOverdraftLimit(Integer overdraftLimit) { - this.overdraftLimit = overdraftLimit; - } - - @Override public boolean equals(Object o) { @@ -166,14 +115,12 @@ public boolean equals(Object o) { } UpdateDepositAccountAttributes updateDepositAccountAttributes = (UpdateDepositAccountAttributes) o; return Objects.equals(this.tags, updateDepositAccountAttributes.tags) && - Objects.equals(this.depositProduct, updateDepositAccountAttributes.depositProduct) && - Objects.equals(this.name, updateDepositAccountAttributes.name) && - Objects.equals(this.overdraftLimit, updateDepositAccountAttributes.overdraftLimit); + Objects.equals(this.depositProduct, updateDepositAccountAttributes.depositProduct); } @Override public int hashCode() { - return Objects.hash(tags, depositProduct, name, overdraftLimit); + return Objects.hash(tags, depositProduct); } @Override @@ -182,8 +129,6 @@ public String toString() { sb.append("class UpdateDepositAccountAttributes {\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" depositProduct: ").append(toIndentedString(depositProduct)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" overdraftLimit: ").append(toIndentedString(overdraftLimit)).append("\n"); sb.append("}"); return sb.toString(); } @@ -208,8 +153,6 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("tags"); openapiFields.add("depositProduct"); - openapiFields.add("name"); - openapiFields.add("overdraftLimit"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -239,9 +182,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("depositProduct") != null && !jsonObj.get("depositProduct").isJsonNull()) && !jsonObj.get("depositProduct").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `depositProduct` to be a primitive type in the JSON string but got `%s`", jsonObj.get("depositProduct").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/UpdateIndividualCustomer.java b/src/main/java/org/openapitools/client/model/UpdateIndividualCustomer.java index 03792949..18734b2c 100644 --- a/src/main/java/org/openapitools/client/model/UpdateIndividualCustomer.java +++ b/src/main/java/org/openapitools/client/model/UpdateIndividualCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateIndividualCustomerAttributes.java b/src/main/java/org/openapitools/client/model/UpdateIndividualCustomerAttributes.java index fb9df452..bf5c5751 100644 --- a/src/main/java/org/openapitools/client/model/UpdateIndividualCustomerAttributes.java +++ b/src/main/java/org/openapitools/client/model/UpdateIndividualCustomerAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdatePayment.java b/src/main/java/org/openapitools/client/model/UpdatePayment.java index 943bd619..6103f22f 100644 --- a/src/main/java/org/openapitools/client/model/UpdatePayment.java +++ b/src/main/java/org/openapitools/client/model/UpdatePayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdatePaymentData.java b/src/main/java/org/openapitools/client/model/UpdatePaymentData.java index a8272326..25a6f1e2 100644 --- a/src/main/java/org/openapitools/client/model/UpdatePaymentData.java +++ b/src/main/java/org/openapitools/client/model/UpdatePaymentData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateReceivedPayment.java b/src/main/java/org/openapitools/client/model/UpdateReceivedPayment.java index 6370c447..c5b76f81 100644 --- a/src/main/java/org/openapitools/client/model/UpdateReceivedPayment.java +++ b/src/main/java/org/openapitools/client/model/UpdateReceivedPayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateReceivedPaymentData.java b/src/main/java/org/openapitools/client/model/UpdateReceivedPaymentData.java index dddff555..36ddf691 100644 --- a/src/main/java/org/openapitools/client/model/UpdateReceivedPaymentData.java +++ b/src/main/java/org/openapitools/client/model/UpdateReceivedPaymentData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateTransaction.java b/src/main/java/org/openapitools/client/model/UpdateTransaction.java index a1779cab..131693b0 100644 --- a/src/main/java/org/openapitools/client/model/UpdateTransaction.java +++ b/src/main/java/org/openapitools/client/model/UpdateTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateTransactionData.java b/src/main/java/org/openapitools/client/model/UpdateTransactionData.java index c10fbb09..8dd5fbd5 100644 --- a/src/main/java/org/openapitools/client/model/UpdateTransactionData.java +++ b/src/main/java/org/openapitools/client/model/UpdateTransactionData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateTrustCustomer.java b/src/main/java/org/openapitools/client/model/UpdateTrustCustomer.java index 8cbf7b06..68796469 100644 --- a/src/main/java/org/openapitools/client/model/UpdateTrustCustomer.java +++ b/src/main/java/org/openapitools/client/model/UpdateTrustCustomer.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateTrustCustomerAttributes.java b/src/main/java/org/openapitools/client/model/UpdateTrustCustomerAttributes.java index 63ef709f..f3ed21b4 100644 --- a/src/main/java/org/openapitools/client/model/UpdateTrustCustomerAttributes.java +++ b/src/main/java/org/openapitools/client/model/UpdateTrustCustomerAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateUnitRequest.java b/src/main/java/org/openapitools/client/model/UpdateUnitRequest.java index db38e192..a6501c02 100644 --- a/src/main/java/org/openapitools/client/model/UpdateUnitRequest.java +++ b/src/main/java/org/openapitools/client/model/UpdateUnitRequest.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateUnitRequestData.java b/src/main/java/org/openapitools/client/model/UpdateUnitRequestData.java index 8376bfe7..1b594307 100644 --- a/src/main/java/org/openapitools/client/model/UpdateUnitRequestData.java +++ b/src/main/java/org/openapitools/client/model/UpdateUnitRequestData.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/UpdateUnitRequestDataAttributes.java b/src/main/java/org/openapitools/client/model/UpdateUnitRequestDataAttributes.java index cf5eeecb..8a38b14b 100644 --- a/src/main/java/org/openapitools/client/model/UpdateUnitRequestDataAttributes.java +++ b/src/main/java/org/openapitools/client/model/UpdateUnitRequestDataAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/ExecuteRequest2.java b/src/main/java/org/openapitools/client/model/VerifyDocument.java similarity index 75% rename from src/main/java/org/openapitools/client/model/ExecuteRequest2.java rename to src/main/java/org/openapitools/client/model/VerifyDocument.java index e3063814..3943d5e9 100644 --- a/src/main/java/org/openapitools/client/model/ExecuteRequest2.java +++ b/src/main/java/org/openapitools/client/model/VerifyDocument.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,18 +47,18 @@ import org.openapitools.client.JSON; /** - * ExecuteRequest2 + * VerifyDocument */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteRequest2 { +public class VerifyDocument { public static final String SERIALIZED_NAME_JOB_ID = "jobId"; @SerializedName(SERIALIZED_NAME_JOB_ID) private String jobId; - public ExecuteRequest2() { + public VerifyDocument() { } - public ExecuteRequest2 jobId(String jobId) { + public VerifyDocument jobId(String jobId) { this.jobId = jobId; return this; @@ -88,8 +88,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExecuteRequest2 executeRequest2 = (ExecuteRequest2) o; - return Objects.equals(this.jobId, executeRequest2.jobId); + VerifyDocument verifyDocument = (VerifyDocument) o; + return Objects.equals(this.jobId, verifyDocument.jobId); } @Override @@ -100,7 +100,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteRequest2 {\n"); + sb.append("class VerifyDocument {\n"); sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); sb.append("}"); return sb.toString(); @@ -134,20 +134,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteRequest2 + * @throws IOException if the JSON Element is invalid with respect to VerifyDocument */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ExecuteRequest2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteRequest2 is not found in the empty JSON string", ExecuteRequest2.openapiRequiredFields.toString())); + if (!VerifyDocument.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyDocument is not found in the empty JSON string", VerifyDocument.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ExecuteRequest2.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteRequest2` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!VerifyDocument.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VerifyDocument` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -160,22 +160,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteRequest2.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteRequest2' and its subtypes + if (!VerifyDocument.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VerifyDocument' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteRequest2.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(VerifyDocument.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExecuteRequest2 value) throws IOException { + public void write(JsonWriter out, VerifyDocument value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ExecuteRequest2 read(JsonReader in) throws IOException { + public VerifyDocument read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -186,18 +186,18 @@ public ExecuteRequest2 read(JsonReader in) throws IOException { } /** - * Create an instance of ExecuteRequest2 given an JSON string + * Create an instance of VerifyDocument given an JSON string * * @param jsonString JSON string - * @return An instance of ExecuteRequest2 - * @throws IOException if the JSON string is invalid with respect to ExecuteRequest2 + * @return An instance of VerifyDocument + * @throws IOException if the JSON string is invalid with respect to VerifyDocument */ - public static ExecuteRequest2 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteRequest2.class); + public static VerifyDocument fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VerifyDocument.class); } /** - * Convert an instance of ExecuteRequest2 to an JSON string + * Convert an instance of VerifyDocument to an JSON string * * @return JSON string */ diff --git a/src/main/java/org/openapitools/client/model/VirtualCardStatus.java b/src/main/java/org/openapitools/client/model/VirtualCardStatus.java index b84f7e7e..b97bf100 100644 --- a/src/main/java/org/openapitools/client/model/VirtualCardStatus.java +++ b/src/main/java/org/openapitools/client/model/VirtualCardStatus.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/Webhook.java b/src/main/java/org/openapitools/client/model/Webhook.java index fe121e98..9925f5f0 100644 --- a/src/main/java/org/openapitools/client/model/Webhook.java +++ b/src/main/java/org/openapitools/client/model/Webhook.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/WebhookAttributes.java b/src/main/java/org/openapitools/client/model/WebhookAttributes.java index e03b8327..f65a22b9 100644 --- a/src/main/java/org/openapitools/client/model/WebhookAttributes.java +++ b/src/main/java/org/openapitools/client/model/WebhookAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -56,9 +56,9 @@ public class WebhookAttributes { @SerializedName(SERIALIZED_NAME_CREATED_AT) private OffsetDateTime createdAt; - public static final String SERIALIZED_NAME_LEBEL = "lebel"; - @SerializedName(SERIALIZED_NAME_LEBEL) - private String lebel; + public static final String SERIALIZED_NAME_LABEL = "label"; + @SerializedName(SERIALIZED_NAME_LABEL) + private String label; public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) @@ -174,6 +174,10 @@ public DeliveryModeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_TOKEN) private String token; + public static final String SERIALIZED_NAME_SUBSCRIPTION_TYPE = "subscriptionType"; + @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_TYPE) + private String subscriptionType; + public WebhookAttributes() { } @@ -198,24 +202,24 @@ public void setCreatedAt(OffsetDateTime createdAt) { } - public WebhookAttributes lebel(String lebel) { + public WebhookAttributes label(String label) { - this.lebel = lebel; + this.label = label; return this; } /** - * Get lebel - * @return lebel + * Get label + * @return label **/ @javax.annotation.Nullable - public String getLebel() { - return lebel; + public String getLabel() { + return label; } - public void setLebel(String lebel) { - this.lebel = lebel; + public void setLabel(String label) { + this.label = label; } @@ -324,6 +328,27 @@ public void setToken(String token) { } + public WebhookAttributes subscriptionType(String subscriptionType) { + + this.subscriptionType = subscriptionType; + return this; + } + + /** + * Get subscriptionType + * @return subscriptionType + **/ + @javax.annotation.Nullable + public String getSubscriptionType() { + return subscriptionType; + } + + + public void setSubscriptionType(String subscriptionType) { + this.subscriptionType = subscriptionType; + } + + @Override public boolean equals(Object o) { @@ -335,17 +360,18 @@ public boolean equals(Object o) { } WebhookAttributes webhookAttributes = (WebhookAttributes) o; return Objects.equals(this.createdAt, webhookAttributes.createdAt) && - Objects.equals(this.lebel, webhookAttributes.lebel) && + Objects.equals(this.label, webhookAttributes.label) && Objects.equals(this.url, webhookAttributes.url) && Objects.equals(this.status, webhookAttributes.status) && Objects.equals(this.contentType, webhookAttributes.contentType) && Objects.equals(this.deliveryMode, webhookAttributes.deliveryMode) && - Objects.equals(this.token, webhookAttributes.token); + Objects.equals(this.token, webhookAttributes.token) && + Objects.equals(this.subscriptionType, webhookAttributes.subscriptionType); } @Override public int hashCode() { - return Objects.hash(createdAt, lebel, url, status, contentType, deliveryMode, token); + return Objects.hash(createdAt, label, url, status, contentType, deliveryMode, token, subscriptionType); } @Override @@ -353,12 +379,13 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WebhookAttributes {\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" lebel: ").append(toIndentedString(lebel)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); sb.append(" deliveryMode: ").append(toIndentedString(deliveryMode)).append("\n"); sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" subscriptionType: ").append(toIndentedString(subscriptionType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -382,12 +409,13 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("createdAt"); - openapiFields.add("lebel"); + openapiFields.add("label"); openapiFields.add("url"); openapiFields.add("status"); openapiFields.add("contentType"); openapiFields.add("deliveryMode"); openapiFields.add("token"); + openapiFields.add("subscriptionType"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -414,8 +442,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("lebel") != null && !jsonObj.get("lebel").isJsonNull()) && !jsonObj.get("lebel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lebel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lebel").toString())); + if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); } if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); @@ -432,6 +460,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); } + if ((jsonObj.get("subscriptionType") != null && !jsonObj.get("subscriptionType").isJsonNull()) && !jsonObj.get("subscriptionType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subscriptionType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/org/openapitools/client/model/WireCounterparty.java b/src/main/java/org/openapitools/client/model/WireCounterparty.java index 6927efae..6e4b3b6f 100644 --- a/src/main/java/org/openapitools/client/model/WireCounterparty.java +++ b/src/main/java/org/openapitools/client/model/WireCounterparty.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/WirePayment.java b/src/main/java/org/openapitools/client/model/WirePayment.java index ea47108a..09955ae1 100644 --- a/src/main/java/org/openapitools/client/model/WirePayment.java +++ b/src/main/java/org/openapitools/client/model/WirePayment.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributes.java index 3c3303e0..cd2af42a 100644 --- a/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributesImadOmad.java b/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributesImadOmad.java index c9ef7269..2eb5ad21 100644 --- a/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributesImadOmad.java +++ b/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributesImadOmad.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/WireTransaction.java b/src/main/java/org/openapitools/client/model/WireTransaction.java index 80b7c114..99226852 100644 --- a/src/main/java/org/openapitools/client/model/WireTransaction.java +++ b/src/main/java/org/openapitools/client/model/WireTransaction.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/org/openapitools/client/model/WireTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/WireTransactionAllOfAttributes.java index cb32733a..46f48fa0 100644 --- a/src/main/java/org/openapitools/client/model/WireTransactionAllOfAttributes.java +++ b/src/main/java/org/openapitools/client/model/WireTransactionAllOfAttributes.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.2.0 + * The version of the OpenAPI document: 0.0.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/test/java/org/openapitools/client/PaymentTests.java b/src/test/java/org/openapitools/client/PaymentTests.java index 12e8b3cf..bb6693db 100644 --- a/src/test/java/org/openapitools/client/PaymentTests.java +++ b/src/test/java/org/openapitools/client/PaymentTests.java @@ -72,8 +72,10 @@ public void CreateBookPaymentTest() throws ApiException { createBookPayment.setRelationships(relationships); CreateAPaymentApi createApi = new CreateAPaymentApi(); - ExecuteRequest6 request = new ExecuteRequest6(); - request.setData(new CreatePayment(createBookPayment)); + CreatePayment request = new CreatePayment(); + CreatePaymentData data = new CreatePaymentData(createBookPayment); + request.setData(data); + UnitPaymentResponse response = createApi.execute(request); assert response.getData().getType().equals("bookPayment"); } @@ -100,8 +102,10 @@ public void CreateAchPaymentTest() throws ApiException { createAchPayment.setRelationships(relationships); CreateAPaymentApi createApi = new CreateAPaymentApi(); - ExecuteRequest6 request = new ExecuteRequest6(); - request.setData(new CreatePayment(createAchPayment)); + CreatePayment request = new CreatePayment(); + CreatePaymentData data = new CreatePaymentData(createAchPayment); + request.setData(data); + UnitPaymentResponse response = createApi.execute(request); assert response.getData().getType().equals("achPayment"); } @@ -129,8 +133,10 @@ public void CreateWirePaymentTest() throws ApiException { createWirePayment.setRelationships(relationships); CreateAPaymentApi createApi = new CreateAPaymentApi(); - ExecuteRequest6 request = new ExecuteRequest6(); - request.setData(new CreatePayment(createWirePayment)); + CreatePayment request = new CreatePayment(); + CreatePaymentData data = new CreatePaymentData(createWirePayment); + request.setData(data); + UnitPaymentResponse response = createApi.execute(request); assert response.getData().getType().equals("wirePayment"); } diff --git a/src/test/java/org/openapitools/client/TokenTests.java b/src/test/java/org/openapitools/client/TokenTests.java index 2af211c3..15fdc497 100644 --- a/src/test/java/org/openapitools/client/TokenTests.java +++ b/src/test/java/org/openapitools/client/TokenTests.java @@ -31,13 +31,14 @@ public void GetOrgTokensTest() throws ApiException { @Test public void CreateCustomerToken() throws ApiException { CreateCustomerTokenApi createApi = new CreateCustomerTokenApi(); - ExecuteRequest16 request = new ExecuteRequest16(); - CreateCustomerToken cct = new CreateCustomerToken(); - CreateCustomerTokenAttributes attributes = new CreateCustomerTokenAttributes(); + CreateCustomerToken request = new CreateCustomerToken(); + + CreateCustomerTokenData data = new CreateCustomerTokenData(); + CreateCustomerTokenDataAttributes attributes = new CreateCustomerTokenDataAttributes(); attributes.setScope("customers accounts"); - cct.setAttributes(attributes); - request.setData(cct); + data.setAttributes(attributes); + request.setData(data); UnitCustomerTokenResponse res = createApi.execute("1527981", request); assert res.getData().getType().equals("customerBearerToken");