diff --git a/openapi-raw.yaml b/openapi-raw.yaml index 747b74b7b..b5f3915fb 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -7527,7 +7527,7 @@ components: initials: '#/components/schemas/SubFormFieldsPerDocumentInitials' text-merge: '#/components/schemas/SubFormFieldsPerDocumentTextMerge' checkbox-merge: '#/components/schemas/SubFormFieldsPerDocumentCheckboxMerge' - x-internal: true + x-internal-class: true x-base-class: true SubSignatureRequestGroupedSigners: required: @@ -8521,7 +8521,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountGetResponse: properties: account: @@ -8532,7 +8532,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountVerifyResponse: properties: account: @@ -8543,7 +8543,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ApiAppGetResponse: properties: api_app: @@ -8554,7 +8554,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ApiAppListResponse: properties: api_apps: @@ -8570,7 +8570,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobGetResponse: properties: bulk_send_job: @@ -8588,7 +8588,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobListResponse: properties: bulk_send_jobs: @@ -8604,7 +8604,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobSendResponse: properties: bulk_send_job: @@ -8615,7 +8615,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EmbeddedEditUrlResponse: properties: embedded: @@ -8626,7 +8626,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EmbeddedSignUrlResponse: properties: embedded: @@ -8637,7 +8637,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ErrorResponse: required: - error @@ -8654,14 +8654,14 @@ components: description: '_t__FileResponse::EXPIRES_AT' type: integer type: object - x-internal: true + x-internal-class: true FileResponseDataUri: properties: data_uri: description: '_t__FileResponse::DATA_URI' type: string type: object - x-internal: true + x-internal-class: true ReportCreateResponse: properties: report: @@ -8672,7 +8672,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true SignatureRequestGetResponse: properties: signature_request: @@ -8683,7 +8683,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true SignatureRequestListResponse: properties: signature_requests: @@ -8699,7 +8699,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountResponse: properties: account_id: @@ -8735,8 +8735,10 @@ components: description: '_t__Account::LOCALE' type: string nullable: true + usage: + $ref: '#/components/schemas/AccountResponseUsage' type: object - x-internal: true + x-internal-class: true OAuthTokenResponse: properties: access_token: @@ -8752,7 +8754,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true AccountResponseQuotas: description: '_t__Account::QUOTA' properties: @@ -8776,15 +8778,28 @@ components: description: '_t__AccountQuota::SMS_VERIFICATIONS_LEFT' type: integer nullable: true + num_fax_pages_left: + description: '_t__AccountQuota::NUM_FAX_PAGES_LEFT' + type: integer + nullable: true + type: object + x-internal-class: true + AccountResponseUsage: + description: '_t__Account::USAGE' + properties: + fax_pages_sent: + description: '_t__AccountUsage::FAX_PAGES_SENT' + type: integer + nullable: true type: object - x-internal: true + x-internal-class: true AccountVerifyResponseAccount: properties: email_address: description: '_t__Account::EMAIL_ADDRESS' type: string type: object - x-internal: true + x-internal-class: true ApiAppResponse: description: '_t__ApiAppResponse::DESCRIPTION' properties: @@ -8818,7 +8833,7 @@ components: white_labeling_options: $ref: '#/components/schemas/ApiAppResponseWhiteLabelingOptions' type: object - x-internal: true + x-internal-class: true ApiAppResponseOAuth: description: '_t__ApiAppResponseOAuth::DESCRIPTION' properties: @@ -8838,7 +8853,7 @@ components: type: boolean type: object nullable: true - x-internal: true + x-internal-class: true ApiAppResponseOptions: description: '_t__ApiAppResponseOptions::DESCRIPTION' properties: @@ -8847,7 +8862,7 @@ components: type: boolean type: object nullable: true - x-internal: true + x-internal-class: true ApiAppResponseOwnerAccount: description: '_t__ApiAppResponseOwnerAccount::DESCRIPTION' properties: @@ -8858,7 +8873,7 @@ components: description: '_t__ApiAppResponseOwnerAccount::EMAIL_ADDRESS' type: string type: object - x-internal: true + x-internal-class: true ApiAppResponseWhiteLabelingOptions: description: '_t__ApiAppResponseWhiteLabelingOptions::DESCRIPTION' properties: @@ -8892,7 +8907,7 @@ components: type: string type: object nullable: true - x-internal: true + x-internal-class: true BulkSendJobResponse: description: '_t__BulkSendJobResponse::DESCRIPTION' properties: @@ -8910,7 +8925,7 @@ components: description: '_t__BulkSendJobResponse::CREATED_AT' type: integer type: object - x-internal: true + x-internal-class: true BulkSendJobGetResponseSignatureRequests: title: BulkSendJobGetResponseSignatureRequests type: object @@ -8922,7 +8937,7 @@ components: bulk_send_job_id: description: '_t__BulkSendJobGetResponseSignatureRequests::BULK_SEND_JOB_ID' type: string - x-internal: true + x-internal-class: true EmbeddedEditUrlResponseEmbedded: description: '_t__EmbeddedEditUrlResponseEmbedded::DESCRIPTION' properties: @@ -8933,7 +8948,7 @@ components: description: '_t__EmbeddedEditUrlResponseEmbedded::EXPIRES_AT' type: integer type: object - x-internal: true + x-internal-class: true EmbeddedSignUrlResponseEmbedded: description: '_t__EmbeddedSignUrlResponseEmbedded::DESCRIPTION' properties: @@ -8944,7 +8959,7 @@ components: description: '_t__EmbeddedSignUrlResponseEmbedded::EXPIRES_AT' type: integer type: object - x-internal: true + x-internal-class: true ErrorResponseError: description: '_t__ErrorResponseError::DESCRIPTION' required: @@ -8978,7 +8993,7 @@ components: description: '_t__ListInfoResponse::PAGE_SIZE' type: integer type: object - x-internal: true + x-internal-class: true ReportResponse: description: '_t__ReportResponse::DESCRIPTION' properties: @@ -8999,7 +9014,7 @@ components: - user_activity - document_status type: object - x-internal: true + x-internal-class: true SignatureRequestResponse: description: '_t__SignatureRequestResponse::DESCRIPTION' properties: @@ -9103,7 +9118,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true SignatureRequestResponseAttachment: description: '_t__SignatureRequestResponseAttachment::DESCRIPTION' required: @@ -9133,7 +9148,7 @@ components: type: integer nullable: true type: object - x-internal: true + x-internal-class: true SignatureRequestResponseCustomFieldBase: description: '_t__SignatureRequestResponseCustomField::DESCRIPTION' required: @@ -9161,7 +9176,7 @@ components: mapping: text: '#/components/schemas/SignatureRequestResponseCustomFieldText' checkbox: '#/components/schemas/SignatureRequestResponseCustomFieldCheckbox' - x-internal: true + x-internal-class: true x-base-class: true SignatureRequestResponseCustomFieldCheckbox: description: '_t__SignatureRequestResponseCustomField::DESCRIPTION_EXTENDS' @@ -9234,7 +9249,7 @@ components: initials: '#/components/schemas/SignatureRequestResponseDataValueInitials' text-merge: '#/components/schemas/SignatureRequestResponseDataValueTextMerge' checkbox-merge: '#/components/schemas/SignatureRequestResponseDataValueCheckboxMerge' - x-internal: true + x-internal-class: true x-base-class: true SignatureRequestResponseDataTypeEnum: type: string @@ -9450,7 +9465,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true TeamResponse: description: '_t__TeamResponse::DESCRIPTION' properties: @@ -9472,7 +9487,7 @@ components: items: type: string type: object - x-internal: true + x-internal-class: true TeamInfoResponse: properties: team_id: @@ -9490,7 +9505,7 @@ components: description: '_t__TeamGeneral::NUM_SUB_TEAMS' type: integer type: object - x-internal: true + x-internal-class: true TeamInviteResponse: properties: email_address: @@ -9512,7 +9527,7 @@ components: description: '_t__TeamInviteResponse::EXPIRES_AT' type: integer type: object - x-internal: true + x-internal-class: true TeamMemberResponse: properties: account_id: @@ -9525,7 +9540,7 @@ components: description: '_t__TeamMemberResponse::MEMBER_ROLE' type: string type: object - x-internal: true + x-internal-class: true TeamParentResponse: description: '_t__TeamInfo::TEAM_PARENT' properties: @@ -9537,7 +9552,7 @@ components: type: string type: object nullable: true - x-internal: true + x-internal-class: true SubTeamResponse: properties: team_id: @@ -9547,7 +9562,7 @@ components: description: '_t__TeamGeneral::NAME' type: string type: object - x-internal: true + x-internal-class: true TemplateResponse: description: '_t__TemplateResponse::DESCRIPTION' properties: @@ -9618,7 +9633,7 @@ components: $ref: '#/components/schemas/TemplateResponseAccount' nullable: true type: object - x-internal: true + x-internal-class: true TemplateResponseAccount: properties: account_id: @@ -9639,7 +9654,7 @@ components: quotas: $ref: '#/components/schemas/TemplateResponseAccountQuota' type: object - x-internal: true + x-internal-class: true TemplateResponseAccountQuota: description: '_t__TemplateResponseAccountQuota::DESCRIPTION' properties: @@ -9656,14 +9671,14 @@ components: description: '_t__TemplateResponseAccountQuota::SMS_VERIFICATIONS_LEFT' type: integer type: object - x-internal: true + x-internal-class: true TemplateResponseCCRole: properties: name: description: '_t__TemplateResponseCCRole::TEMPLATES_LEFT' type: string type: object - x-internal: true + x-internal-class: true TemplateCreateEmbeddedDraftResponseTemplate: description: '_t__TemplateCreateEmbeddedDraftResponseTemplate::DESCRIPTION' properties: @@ -9683,7 +9698,7 @@ components: $ref: '#/components/schemas/WarningResponse' deprecated: true type: object - x-internal: true + x-internal-class: true TemplateCreateResponseTemplate: description: '_t__TemplateCreateResponseTemplate::DESCRIPTION' properties: @@ -9691,7 +9706,7 @@ components: description: '_t__TemplateResponse::TEMPLATE_ID' type: string type: object - x-internal: true + x-internal-class: true TemplateResponseDocument: properties: name: @@ -9722,7 +9737,7 @@ components: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' nullable: true type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentCustomFieldBase: description: '_t__TemplateResponseDocumentCustomField::DESCRIPTION' required: @@ -9765,7 +9780,7 @@ components: mapping: text: '#/components/schemas/TemplateResponseDocumentCustomFieldText' checkbox: '#/components/schemas/TemplateResponseDocumentCustomFieldCheckbox' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentCustomFieldCheckbox: description: '_t__TemplateResponseDocumentCustomField::DESCRIPTION_EXTENDS' @@ -9814,7 +9829,7 @@ components: rule: $ref: '#/components/schemas/TemplateResponseDocumentFieldGroupRule' type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentFieldGroupRule: description: '_t__TemplateResponseDocumentFieldGroup::RULE' properties: @@ -9825,7 +9840,7 @@ components: description: '_t__TemplateResponseDocumentFieldGroupRule::GROUP_LABEL' type: string type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentFormFieldBase: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION' required: @@ -9873,7 +9888,7 @@ components: signature: '#/components/schemas/TemplateResponseDocumentFormFieldSignature' date_signed: '#/components/schemas/TemplateResponseDocumentFormFieldDateSigned' initials: '#/components/schemas/TemplateResponseDocumentFormFieldInitials' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION_EXTENDS' @@ -10087,7 +10102,7 @@ components: signature: '#/components/schemas/TemplateResponseDocumentStaticFieldSignature' date_signed: '#/components/schemas/TemplateResponseDocumentStaticFieldDateSigned' initials: '#/components/schemas/TemplateResponseDocumentStaticFieldInitials' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentStaticFieldCheckbox: description: '_t__TemplateResponseDocumentStaticField::DESCRIPTION_EXTENDS' @@ -10227,7 +10242,7 @@ components: description: '_t__TemplateResponseFieldAvgTextLength::NUM_CHARS_PER_LINE' type: integer type: object - x-internal: true + x-internal-class: true TemplateResponseSignerRole: properties: name: @@ -10237,7 +10252,7 @@ components: description: '_t__TemplateResponseSignerRole::ORDER' type: integer type: object - x-internal: true + x-internal-class: true TemplateUpdateFilesResponseTemplate: description: '_t__TemplateUpdateFilesResponseTemplate::DESCRIPTION' properties: @@ -10251,7 +10266,7 @@ components: $ref: '#/components/schemas/WarningResponse' deprecated: true type: object - x-internal: true + x-internal-class: true UnclaimedDraftResponse: description: '_t__UnclaimedDraftResponse::DESCRIPTION' properties: @@ -10278,7 +10293,7 @@ components: description: '_t__UnclaimedDraft::TEST_MODE' type: boolean type: object - x-internal: true + x-internal-class: true WarningResponse: description: '_t__WarningResponse::LIST_DESCRIPTION' required: @@ -10302,7 +10317,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamGetInfoResponse: properties: team: @@ -10313,7 +10328,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamInvitesResponse: properties: team_invites: @@ -10326,7 +10341,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamMembersResponse: properties: team_members: @@ -10341,7 +10356,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamSubTeamsResponse: properties: sub_teams: @@ -10356,7 +10371,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateCreateResponse: properties: template: @@ -10367,7 +10382,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateCreateEmbeddedDraftResponse: properties: template: @@ -10378,7 +10393,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateEditResponse: properties: template_id: @@ -10395,7 +10410,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateListResponse: properties: templates: @@ -10411,13 +10426,13 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateUpdateFilesResponse: properties: template: $ref: '#/components/schemas/TemplateUpdateFilesResponseTemplate' type: object - x-internal: true + x-internal-class: true UnclaimedDraftCreateResponse: properties: unclaimed_draft: @@ -10428,7 +10443,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EventCallbackRequest: title: EventCallbackRequest required: diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 6a2f61a71..9bf5a68ea 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -7918,7 +7918,7 @@ components: initials: '#/components/schemas/SubFormFieldsPerDocumentInitials' text-merge: '#/components/schemas/SubFormFieldsPerDocumentTextMerge' checkbox-merge: '#/components/schemas/SubFormFieldsPerDocumentCheckboxMerge' - x-internal: true + x-internal-class: true x-base-class: true SubSignatureRequestGroupedSigners: required: @@ -9129,7 +9129,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountGetResponse: properties: account: @@ -9140,7 +9140,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountVerifyResponse: properties: account: @@ -9151,7 +9151,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ApiAppGetResponse: properties: api_app: @@ -9162,7 +9162,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ApiAppListResponse: properties: api_apps: @@ -9178,7 +9178,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobGetResponse: properties: bulk_send_job: @@ -9196,7 +9196,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobListResponse: properties: bulk_send_jobs: @@ -9212,7 +9212,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobSendResponse: properties: bulk_send_job: @@ -9223,7 +9223,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EmbeddedEditUrlResponse: properties: embedded: @@ -9234,7 +9234,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EmbeddedSignUrlResponse: properties: embedded: @@ -9245,7 +9245,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ErrorResponse: required: - error @@ -9262,14 +9262,14 @@ components: description: 'When the link expires.' type: integer type: object - x-internal: true + x-internal-class: true FileResponseDataUri: properties: data_uri: description: 'File as base64 encoded string.' type: string type: object - x-internal: true + x-internal-class: true ReportCreateResponse: properties: report: @@ -9280,7 +9280,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true SignatureRequestGetResponse: properties: signature_request: @@ -9291,7 +9291,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true SignatureRequestListResponse: properties: signature_requests: @@ -9307,7 +9307,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountResponse: properties: account_id: @@ -9343,8 +9343,10 @@ components: description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' type: string nullable: true + usage: + $ref: '#/components/schemas/AccountResponseUsage' type: object - x-internal: true + x-internal-class: true OAuthTokenResponse: properties: access_token: @@ -9360,7 +9362,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true AccountResponseQuotas: description: 'Details concerning remaining monthly quotas.' properties: @@ -9384,15 +9386,28 @@ components: description: 'SMS verifications remaining.' type: integer nullable: true + num_fax_pages_left: + description: 'Number of fax pages left' + type: integer + nullable: true + type: object + x-internal-class: true + AccountResponseUsage: + description: 'Details concerning monthly usage' + properties: + fax_pages_sent: + description: 'Number of fax pages sent' + type: integer + nullable: true type: object - x-internal: true + x-internal-class: true AccountVerifyResponseAccount: properties: email_address: description: 'The email address associated with the Account.' type: string type: object - x-internal: true + x-internal-class: true ApiAppResponse: description: 'Contains information about an API App.' properties: @@ -9426,7 +9441,7 @@ components: white_labeling_options: $ref: '#/components/schemas/ApiAppResponseWhiteLabelingOptions' type: object - x-internal: true + x-internal-class: true ApiAppResponseOAuth: description: 'An object describing the app''s OAuth properties, or null if OAuth is not configured for the app.' properties: @@ -9446,7 +9461,7 @@ components: type: boolean type: object nullable: true - x-internal: true + x-internal-class: true ApiAppResponseOptions: description: 'An object with options that override account settings.' properties: @@ -9455,7 +9470,7 @@ components: type: boolean type: object nullable: true - x-internal: true + x-internal-class: true ApiAppResponseOwnerAccount: description: 'An object describing the app''s owner' properties: @@ -9466,7 +9481,7 @@ components: description: 'The owner account''s email address' type: string type: object - x-internal: true + x-internal-class: true ApiAppResponseWhiteLabelingOptions: description: 'An object with options to customize the app''s signer page' properties: @@ -9500,7 +9515,7 @@ components: type: string type: object nullable: true - x-internal: true + x-internal-class: true BulkSendJobResponse: description: 'Contains information about the BulkSendJob such as when it was created and how many signature requests are queued.' properties: @@ -9518,7 +9533,7 @@ components: description: 'Time that the BulkSendJob was created.' type: integer type: object - x-internal: true + x-internal-class: true BulkSendJobGetResponseSignatureRequests: title: BulkSendJobGetResponseSignatureRequests type: object @@ -9530,7 +9545,7 @@ components: bulk_send_job_id: description: 'The id of the BulkSendJob.' type: string - x-internal: true + x-internal-class: true EmbeddedEditUrlResponseEmbedded: description: 'An embedded template object.' properties: @@ -9541,7 +9556,7 @@ components: description: 'The specific time that the the `edit_url` link expires, in epoch.' type: integer type: object - x-internal: true + x-internal-class: true EmbeddedSignUrlResponseEmbedded: description: 'An object that contains necessary information to set up embedded signing.' properties: @@ -9552,7 +9567,7 @@ components: description: 'The specific time that the the `sign_url` link expires, in epoch.' type: integer type: object - x-internal: true + x-internal-class: true ErrorResponseError: description: 'Contains information about an error that occurred.' required: @@ -9586,7 +9601,7 @@ components: description: 'Objects returned per page.' type: integer type: object - x-internal: true + x-internal-class: true ReportResponse: description: 'Contains information about the report request.' properties: @@ -9607,7 +9622,7 @@ components: - user_activity - document_status type: object - x-internal: true + x-internal-class: true SignatureRequestResponse: description: 'Contains information about a signature request.' properties: @@ -9715,7 +9730,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true SignatureRequestResponseAttachment: description: 'Signer attachments.' required: @@ -9745,7 +9760,7 @@ components: type: integer nullable: true type: object - x-internal: true + x-internal-class: true SignatureRequestResponseCustomFieldBase: description: |- An array of Custom Field objects containing the name and type of each custom field. @@ -9777,7 +9792,7 @@ components: mapping: text: '#/components/schemas/SignatureRequestResponseCustomFieldText' checkbox: '#/components/schemas/SignatureRequestResponseCustomFieldCheckbox' - x-internal: true + x-internal-class: true x-base-class: true SignatureRequestResponseCustomFieldCheckbox: description: 'This class extends `SignatureRequestResponseCustomFieldBase`.' @@ -9850,7 +9865,7 @@ components: initials: '#/components/schemas/SignatureRequestResponseDataValueInitials' text-merge: '#/components/schemas/SignatureRequestResponseDataValueTextMerge' checkbox-merge: '#/components/schemas/SignatureRequestResponseDataValueCheckboxMerge' - x-internal: true + x-internal-class: true x-base-class: true SignatureRequestResponseDataTypeEnum: type: string @@ -10066,7 +10081,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true TeamResponse: description: 'Contains information about your team and its members' properties: @@ -10088,7 +10103,7 @@ components: items: type: string type: object - x-internal: true + x-internal-class: true TeamInfoResponse: properties: team_id: @@ -10106,7 +10121,7 @@ components: description: 'Number of sub teams within a team' type: integer type: object - x-internal: true + x-internal-class: true TeamInviteResponse: properties: email_address: @@ -10128,7 +10143,7 @@ components: description: 'Timestamp when the invitation is expiring.' type: integer type: object - x-internal: true + x-internal-class: true TeamMemberResponse: properties: account_id: @@ -10141,7 +10156,7 @@ components: description: 'The specific role a member has on the team.' type: string type: object - x-internal: true + x-internal-class: true TeamParentResponse: description: 'Information about the parent team if a team has one, set to `null` otherwise.' properties: @@ -10153,7 +10168,7 @@ components: type: string type: object nullable: true - x-internal: true + x-internal-class: true SubTeamResponse: properties: team_id: @@ -10163,7 +10178,7 @@ components: description: 'The name of a team' type: string type: object - x-internal: true + x-internal-class: true TemplateResponse: description: 'Contains information about the templates you and your team have created.' properties: @@ -10237,7 +10252,7 @@ components: $ref: '#/components/schemas/TemplateResponseAccount' nullable: true type: object - x-internal: true + x-internal-class: true TemplateResponseAccount: properties: account_id: @@ -10258,7 +10273,7 @@ components: quotas: $ref: '#/components/schemas/TemplateResponseAccountQuota' type: object - x-internal: true + x-internal-class: true TemplateResponseAccountQuota: description: 'An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template.' properties: @@ -10275,14 +10290,14 @@ components: description: 'SMS verifications remaining.' type: integer type: object - x-internal: true + x-internal-class: true TemplateResponseCCRole: properties: name: description: 'The name of the Role.' type: string type: object - x-internal: true + x-internal-class: true TemplateCreateEmbeddedDraftResponseTemplate: description: 'Template object with parameters: `template_id`, `edit_url`, `expires_at`.' properties: @@ -10302,7 +10317,7 @@ components: $ref: '#/components/schemas/WarningResponse' deprecated: true type: object - x-internal: true + x-internal-class: true TemplateCreateResponseTemplate: description: 'Template object with parameters: `template_id`.' properties: @@ -10310,7 +10325,7 @@ components: description: 'The id of the Template.' type: string type: object - x-internal: true + x-internal-class: true TemplateResponseDocument: properties: name: @@ -10341,7 +10356,7 @@ components: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' nullable: true type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentCustomFieldBase: description: 'An array of Form Field objects containing the name and type of each named field.' required: @@ -10384,7 +10399,7 @@ components: mapping: text: '#/components/schemas/TemplateResponseDocumentCustomFieldText' checkbox: '#/components/schemas/TemplateResponseDocumentCustomFieldCheckbox' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentCustomFieldCheckbox: description: 'This class extends `TemplateResponseDocumentCustomFieldBase`' @@ -10441,7 +10456,7 @@ components: rule: $ref: '#/components/schemas/TemplateResponseDocumentFieldGroupRule' type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentFieldGroupRule: description: 'The rule used to validate checkboxes in the form field group. See [checkbox field grouping](/api/reference/constants/#checkbox-field-grouping).' properties: @@ -10457,7 +10472,7 @@ components: description: 'Name of the group' type: string type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentFormFieldBase: description: 'An array of Form Field objects containing the name and type of each named field.' required: @@ -10505,7 +10520,7 @@ components: signature: '#/components/schemas/TemplateResponseDocumentFormFieldSignature' date_signed: '#/components/schemas/TemplateResponseDocumentFormFieldDateSigned' initials: '#/components/schemas/TemplateResponseDocumentFormFieldInitials' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -10799,7 +10814,7 @@ components: signature: '#/components/schemas/TemplateResponseDocumentStaticFieldSignature' date_signed: '#/components/schemas/TemplateResponseDocumentStaticFieldDateSigned' initials: '#/components/schemas/TemplateResponseDocumentStaticFieldInitials' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentStaticFieldCheckbox: description: 'This class extends `TemplateResponseDocumentStaticFieldBase`' @@ -11019,7 +11034,7 @@ components: description: 'Number of characters per line.' type: integer type: object - x-internal: true + x-internal-class: true TemplateResponseSignerRole: properties: name: @@ -11029,7 +11044,7 @@ components: description: 'If signer order is assigned this is the 0-based index for this role.' type: integer type: object - x-internal: true + x-internal-class: true TemplateUpdateFilesResponseTemplate: description: 'Contains template id' properties: @@ -11043,7 +11058,7 @@ components: $ref: '#/components/schemas/WarningResponse' deprecated: true type: object - x-internal: true + x-internal-class: true UnclaimedDraftResponse: description: 'A group of documents that a user can take ownership of via the claim URL.' properties: @@ -11070,7 +11085,7 @@ components: description: 'Whether this is a test draft. Signature requests made from test drafts have no legal value.' type: boolean type: object - x-internal: true + x-internal-class: true WarningResponse: description: 'A list of warnings.' required: @@ -11094,7 +11109,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamGetInfoResponse: properties: team: @@ -11105,7 +11120,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamInvitesResponse: properties: team_invites: @@ -11118,7 +11133,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamMembersResponse: properties: team_members: @@ -11133,7 +11148,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamSubTeamsResponse: properties: sub_teams: @@ -11148,7 +11163,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateCreateResponse: properties: template: @@ -11159,7 +11174,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateCreateEmbeddedDraftResponse: properties: template: @@ -11170,7 +11185,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateEditResponse: properties: template_id: @@ -11187,7 +11202,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateListResponse: properties: templates: @@ -11203,13 +11218,13 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateUpdateFilesResponse: properties: template: $ref: '#/components/schemas/TemplateUpdateFilesResponseTemplate' type: object - x-internal: true + x-internal-class: true UnclaimedDraftCreateResponse: properties: unclaimed_draft: @@ -11220,7 +11235,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EventCallbackRequest: title: EventCallbackRequest required: diff --git a/openapi.yaml b/openapi.yaml index af6b07aa1..63b2059ab 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -7896,7 +7896,7 @@ components: initials: '#/components/schemas/SubFormFieldsPerDocumentInitials' text-merge: '#/components/schemas/SubFormFieldsPerDocumentTextMerge' checkbox-merge: '#/components/schemas/SubFormFieldsPerDocumentCheckboxMerge' - x-internal: true + x-internal-class: true x-base-class: true SubSignatureRequestGroupedSigners: required: @@ -9107,7 +9107,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountGetResponse: properties: account: @@ -9118,7 +9118,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountVerifyResponse: properties: account: @@ -9129,7 +9129,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ApiAppGetResponse: properties: api_app: @@ -9140,7 +9140,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ApiAppListResponse: properties: api_apps: @@ -9156,7 +9156,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobGetResponse: properties: bulk_send_job: @@ -9174,7 +9174,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobListResponse: properties: bulk_send_jobs: @@ -9190,7 +9190,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobSendResponse: properties: bulk_send_job: @@ -9201,7 +9201,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EmbeddedEditUrlResponse: properties: embedded: @@ -9212,7 +9212,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EmbeddedSignUrlResponse: properties: embedded: @@ -9223,7 +9223,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ErrorResponse: required: - error @@ -9240,14 +9240,14 @@ components: description: 'When the link expires.' type: integer type: object - x-internal: true + x-internal-class: true FileResponseDataUri: properties: data_uri: description: 'File as base64 encoded string.' type: string type: object - x-internal: true + x-internal-class: true ReportCreateResponse: properties: report: @@ -9258,7 +9258,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true SignatureRequestGetResponse: properties: signature_request: @@ -9269,7 +9269,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true SignatureRequestListResponse: properties: signature_requests: @@ -9285,7 +9285,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountResponse: properties: account_id: @@ -9321,8 +9321,10 @@ components: description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' type: string nullable: true + usage: + $ref: '#/components/schemas/AccountResponseUsage' type: object - x-internal: true + x-internal-class: true OAuthTokenResponse: properties: access_token: @@ -9338,7 +9340,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true AccountResponseQuotas: description: 'Details concerning remaining monthly quotas.' properties: @@ -9362,15 +9364,28 @@ components: description: 'SMS verifications remaining.' type: integer nullable: true + num_fax_pages_left: + description: 'Number of fax pages left' + type: integer + nullable: true + type: object + x-internal-class: true + AccountResponseUsage: + description: 'Details concerning monthly usage' + properties: + fax_pages_sent: + description: 'Number of fax pages sent' + type: integer + nullable: true type: object - x-internal: true + x-internal-class: true AccountVerifyResponseAccount: properties: email_address: description: 'The email address associated with the Account.' type: string type: object - x-internal: true + x-internal-class: true ApiAppResponse: description: 'Contains information about an API App.' properties: @@ -9404,7 +9419,7 @@ components: white_labeling_options: $ref: '#/components/schemas/ApiAppResponseWhiteLabelingOptions' type: object - x-internal: true + x-internal-class: true ApiAppResponseOAuth: description: 'An object describing the app''s OAuth properties, or null if OAuth is not configured for the app.' properties: @@ -9424,7 +9439,7 @@ components: type: boolean type: object nullable: true - x-internal: true + x-internal-class: true ApiAppResponseOptions: description: 'An object with options that override account settings.' properties: @@ -9433,7 +9448,7 @@ components: type: boolean type: object nullable: true - x-internal: true + x-internal-class: true ApiAppResponseOwnerAccount: description: 'An object describing the app''s owner' properties: @@ -9444,7 +9459,7 @@ components: description: 'The owner account''s email address' type: string type: object - x-internal: true + x-internal-class: true ApiAppResponseWhiteLabelingOptions: description: 'An object with options to customize the app''s signer page' properties: @@ -9478,7 +9493,7 @@ components: type: string type: object nullable: true - x-internal: true + x-internal-class: true BulkSendJobResponse: description: 'Contains information about the BulkSendJob such as when it was created and how many signature requests are queued.' properties: @@ -9496,7 +9511,7 @@ components: description: 'Time that the BulkSendJob was created.' type: integer type: object - x-internal: true + x-internal-class: true BulkSendJobGetResponseSignatureRequests: title: BulkSendJobGetResponseSignatureRequests type: object @@ -9508,7 +9523,7 @@ components: bulk_send_job_id: description: 'The id of the BulkSendJob.' type: string - x-internal: true + x-internal-class: true EmbeddedEditUrlResponseEmbedded: description: 'An embedded template object.' properties: @@ -9519,7 +9534,7 @@ components: description: 'The specific time that the the `edit_url` link expires, in epoch.' type: integer type: object - x-internal: true + x-internal-class: true EmbeddedSignUrlResponseEmbedded: description: 'An object that contains necessary information to set up embedded signing.' properties: @@ -9530,7 +9545,7 @@ components: description: 'The specific time that the the `sign_url` link expires, in epoch.' type: integer type: object - x-internal: true + x-internal-class: true ErrorResponseError: description: 'Contains information about an error that occurred.' required: @@ -9564,7 +9579,7 @@ components: description: 'Objects returned per page.' type: integer type: object - x-internal: true + x-internal-class: true ReportResponse: description: 'Contains information about the report request.' properties: @@ -9585,7 +9600,7 @@ components: - user_activity - document_status type: object - x-internal: true + x-internal-class: true SignatureRequestResponse: description: 'Contains information about a signature request.' properties: @@ -9693,7 +9708,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true SignatureRequestResponseAttachment: description: 'Signer attachments.' required: @@ -9723,7 +9738,7 @@ components: type: integer nullable: true type: object - x-internal: true + x-internal-class: true SignatureRequestResponseCustomFieldBase: description: |- An array of Custom Field objects containing the name and type of each custom field. @@ -9755,7 +9770,7 @@ components: mapping: text: '#/components/schemas/SignatureRequestResponseCustomFieldText' checkbox: '#/components/schemas/SignatureRequestResponseCustomFieldCheckbox' - x-internal: true + x-internal-class: true x-base-class: true SignatureRequestResponseCustomFieldCheckbox: description: 'This class extends `SignatureRequestResponseCustomFieldBase`.' @@ -9828,7 +9843,7 @@ components: initials: '#/components/schemas/SignatureRequestResponseDataValueInitials' text-merge: '#/components/schemas/SignatureRequestResponseDataValueTextMerge' checkbox-merge: '#/components/schemas/SignatureRequestResponseDataValueCheckboxMerge' - x-internal: true + x-internal-class: true x-base-class: true SignatureRequestResponseDataTypeEnum: type: string @@ -10044,7 +10059,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true TeamResponse: description: 'Contains information about your team and its members' properties: @@ -10066,7 +10081,7 @@ components: items: type: string type: object - x-internal: true + x-internal-class: true TeamInfoResponse: properties: team_id: @@ -10084,7 +10099,7 @@ components: description: 'Number of sub teams within a team' type: integer type: object - x-internal: true + x-internal-class: true TeamInviteResponse: properties: email_address: @@ -10106,7 +10121,7 @@ components: description: 'Timestamp when the invitation is expiring.' type: integer type: object - x-internal: true + x-internal-class: true TeamMemberResponse: properties: account_id: @@ -10119,7 +10134,7 @@ components: description: 'The specific role a member has on the team.' type: string type: object - x-internal: true + x-internal-class: true TeamParentResponse: description: 'Information about the parent team if a team has one, set to `null` otherwise.' properties: @@ -10131,7 +10146,7 @@ components: type: string type: object nullable: true - x-internal: true + x-internal-class: true SubTeamResponse: properties: team_id: @@ -10141,7 +10156,7 @@ components: description: 'The name of a team' type: string type: object - x-internal: true + x-internal-class: true TemplateResponse: description: 'Contains information about the templates you and your team have created.' properties: @@ -10215,7 +10230,7 @@ components: $ref: '#/components/schemas/TemplateResponseAccount' nullable: true type: object - x-internal: true + x-internal-class: true TemplateResponseAccount: properties: account_id: @@ -10236,7 +10251,7 @@ components: quotas: $ref: '#/components/schemas/TemplateResponseAccountQuota' type: object - x-internal: true + x-internal-class: true TemplateResponseAccountQuota: description: 'An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template.' properties: @@ -10253,14 +10268,14 @@ components: description: 'SMS verifications remaining.' type: integer type: object - x-internal: true + x-internal-class: true TemplateResponseCCRole: properties: name: description: 'The name of the Role.' type: string type: object - x-internal: true + x-internal-class: true TemplateCreateEmbeddedDraftResponseTemplate: description: 'Template object with parameters: `template_id`, `edit_url`, `expires_at`.' properties: @@ -10280,7 +10295,7 @@ components: $ref: '#/components/schemas/WarningResponse' deprecated: true type: object - x-internal: true + x-internal-class: true TemplateCreateResponseTemplate: description: 'Template object with parameters: `template_id`.' properties: @@ -10288,7 +10303,7 @@ components: description: 'The id of the Template.' type: string type: object - x-internal: true + x-internal-class: true TemplateResponseDocument: properties: name: @@ -10319,7 +10334,7 @@ components: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' nullable: true type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentCustomFieldBase: description: 'An array of Form Field objects containing the name and type of each named field.' required: @@ -10362,7 +10377,7 @@ components: mapping: text: '#/components/schemas/TemplateResponseDocumentCustomFieldText' checkbox: '#/components/schemas/TemplateResponseDocumentCustomFieldCheckbox' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentCustomFieldCheckbox: description: 'This class extends `TemplateResponseDocumentCustomFieldBase`' @@ -10419,7 +10434,7 @@ components: rule: $ref: '#/components/schemas/TemplateResponseDocumentFieldGroupRule' type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentFieldGroupRule: description: 'The rule used to validate checkboxes in the form field group. See [checkbox field grouping](/api/reference/constants/#checkbox-field-grouping).' properties: @@ -10435,7 +10450,7 @@ components: description: 'Name of the group' type: string type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentFormFieldBase: description: 'An array of Form Field objects containing the name and type of each named field.' required: @@ -10483,7 +10498,7 @@ components: signature: '#/components/schemas/TemplateResponseDocumentFormFieldSignature' date_signed: '#/components/schemas/TemplateResponseDocumentFormFieldDateSigned' initials: '#/components/schemas/TemplateResponseDocumentFormFieldInitials' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -10777,7 +10792,7 @@ components: signature: '#/components/schemas/TemplateResponseDocumentStaticFieldSignature' date_signed: '#/components/schemas/TemplateResponseDocumentStaticFieldDateSigned' initials: '#/components/schemas/TemplateResponseDocumentStaticFieldInitials' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentStaticFieldCheckbox: description: 'This class extends `TemplateResponseDocumentStaticFieldBase`' @@ -10997,7 +11012,7 @@ components: description: 'Number of characters per line.' type: integer type: object - x-internal: true + x-internal-class: true TemplateResponseSignerRole: properties: name: @@ -11007,7 +11022,7 @@ components: description: 'If signer order is assigned this is the 0-based index for this role.' type: integer type: object - x-internal: true + x-internal-class: true TemplateUpdateFilesResponseTemplate: description: 'Contains template id' properties: @@ -11021,7 +11036,7 @@ components: $ref: '#/components/schemas/WarningResponse' deprecated: true type: object - x-internal: true + x-internal-class: true UnclaimedDraftResponse: description: 'A group of documents that a user can take ownership of via the claim URL.' properties: @@ -11048,7 +11063,7 @@ components: description: 'Whether this is a test draft. Signature requests made from test drafts have no legal value.' type: boolean type: object - x-internal: true + x-internal-class: true WarningResponse: description: 'A list of warnings.' required: @@ -11072,7 +11087,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamGetInfoResponse: properties: team: @@ -11083,7 +11098,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamInvitesResponse: properties: team_invites: @@ -11096,7 +11111,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamMembersResponse: properties: team_members: @@ -11111,7 +11126,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamSubTeamsResponse: properties: sub_teams: @@ -11126,7 +11141,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateCreateResponse: properties: template: @@ -11137,7 +11152,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateCreateEmbeddedDraftResponse: properties: template: @@ -11148,7 +11163,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateEditResponse: properties: template_id: @@ -11165,7 +11180,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateListResponse: properties: templates: @@ -11181,13 +11196,13 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateUpdateFilesResponse: properties: template: $ref: '#/components/schemas/TemplateUpdateFilesResponseTemplate' type: object - x-internal: true + x-internal-class: true UnclaimedDraftCreateResponse: properties: unclaimed_draft: @@ -11198,7 +11213,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EventCallbackRequest: title: EventCallbackRequest required: diff --git a/sdks/dotnet/README.md b/sdks/dotnet/README.md index 0304f7a94..19444f601 100644 --- a/sdks/dotnet/README.md +++ b/sdks/dotnet/README.md @@ -23,7 +23,7 @@ directory that corresponds to the file you want updated. This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- SDK version: 1.4-dev +- SDK version: 1.5-dev - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen ### Building @@ -191,6 +191,7 @@ Class | Method | HTTP request | Description - [Model.AccountGetResponse](docs/AccountGetResponse.md) - [Model.AccountResponse](docs/AccountResponse.md) - [Model.AccountResponseQuotas](docs/AccountResponseQuotas.md) + - [Model.AccountResponseUsage](docs/AccountResponseUsage.md) - [Model.AccountUpdateRequest](docs/AccountUpdateRequest.md) - [Model.AccountVerifyRequest](docs/AccountVerifyRequest.md) - [Model.AccountVerifyResponse](docs/AccountVerifyResponse.md) diff --git a/sdks/dotnet/VERSION b/sdks/dotnet/VERSION index d918f457e..6f3dd2f48 100644 --- a/sdks/dotnet/VERSION +++ b/sdks/dotnet/VERSION @@ -1 +1 @@ -1.4-dev +1.5-dev diff --git a/sdks/dotnet/docs/AccountResponse.md b/sdks/dotnet/docs/AccountResponse.md index d348d1397..b26ddb8c6 100644 --- a/sdks/dotnet/docs/AccountResponse.md +++ b/sdks/dotnet/docs/AccountResponse.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **RoleCode** | **string** | The membership role for the team. | [optional] **TeamId** | **string** | The id of the team account belongs to. | [optional] **Locale** | **string** | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | [optional] +**Usage** | [**AccountResponseUsage**](AccountResponseUsage.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/AccountResponseQuotas.md b/sdks/dotnet/docs/AccountResponseQuotas.md index 39a225878..fae9d2397 100644 --- a/sdks/dotnet/docs/AccountResponseQuotas.md +++ b/sdks/dotnet/docs/AccountResponseQuotas.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **TemplatesTotal** | **int?** | Total API templates allowed. | [optional] **TemplatesLeft** | **int?** | API templates remaining. | [optional] **SmsVerificationsLeft** | **int?** | SMS verifications remaining. | [optional] +**NumFaxPagesLeft** | **int?** | Number of fax pages left | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/AccountResponseUsage.md b/sdks/dotnet/docs/AccountResponseUsage.md new file mode 100644 index 000000000..fa5536881 --- /dev/null +++ b/sdks/dotnet/docs/AccountResponseUsage.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.AccountResponseUsage +Details concerning monthly usage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FaxPagesSent** | **int?** | Number of fax pages sent | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/openapi-config.yaml b/sdks/dotnet/openapi-config.yaml index d4b9cc87e..b8a7b6d7a 100644 --- a/sdks/dotnet/openapi-config.yaml +++ b/sdks/dotnet/openapi-config.yaml @@ -5,7 +5,7 @@ additionalProperties: packageAuthors: Dropbox Sign API Team packageCompany: Dropbox Sign API Team packageDescription: Client library for using the Dropbox Sign API - packageVersion: 1.4-dev + packageVersion: 1.5-dev packageTitle: Dropbox Sign .Net SDK sortModelPropertiesByRequiredFlag: true optionalEmitDefaultValues: true diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs b/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs index 3b77bc44c..b1e4a868f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs @@ -36,7 +36,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "1.4-dev"; + public const string Version = "1.5-dev"; /// /// Identifier for ISO 8601 DateTime Format @@ -118,7 +118,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.4-dev/csharp"); + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.5-dev/csharp"); BasePath = "https://api.hellosign.com/v3"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -550,7 +550,7 @@ public static string ToDebugReport() report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; report += " Version of the API: 3.0.0\n"; - report += " SDK Package Version: 1.4-dev\n"; + report += " SDK Package Version: 1.5-dev\n"; return report; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj b/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj index 5cdf757ae..ccb83267d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj +++ b/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj @@ -11,7 +11,7 @@ Dropbox Sign .Net SDK Client library for using the Dropbox Sign API Dropbox.Sign - 1.4-dev + 1.5-dev bin\$(Configuration)\$(TargetFramework)\Dropbox.Sign.xml https://github.com/hellosign/dropbox-sign-dotnet.git git diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponse.cs index 1368e383c..e5b102f62 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponse.cs @@ -51,7 +51,8 @@ protected AccountResponse() { } /// The membership role for the team.. /// The id of the team account belongs to.. /// The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.. - public AccountResponse(string accountId = default(string), string emailAddress = default(string), bool isLocked = default(bool), bool isPaidHs = default(bool), bool isPaidHf = default(bool), AccountResponseQuotas quotas = default(AccountResponseQuotas), string callbackUrl = default(string), string roleCode = default(string), string teamId = default(string), string locale = default(string)) + /// usage. + public AccountResponse(string accountId = default(string), string emailAddress = default(string), bool isLocked = default(bool), bool isPaidHs = default(bool), bool isPaidHf = default(bool), AccountResponseQuotas quotas = default(AccountResponseQuotas), string callbackUrl = default(string), string roleCode = default(string), string teamId = default(string), string locale = default(string), AccountResponseUsage usage = default(AccountResponseUsage)) { this.AccountId = accountId; @@ -64,6 +65,7 @@ protected AccountResponse() { } this.RoleCode = roleCode; this.TeamId = teamId; this.Locale = locale; + this.Usage = usage; } /// @@ -151,6 +153,12 @@ public static AccountResponse Init(string jsonData) [DataMember(Name = "locale", EmitDefaultValue = true)] public string Locale { get; set; } + /// + /// Gets or Sets Usage + /// + [DataMember(Name = "usage", EmitDefaultValue = true)] + public AccountResponseUsage Usage { get; set; } + /// /// Returns the string presentation of the object /// @@ -169,6 +177,7 @@ public override string ToString() sb.Append(" RoleCode: ").Append(RoleCode).Append("\n"); sb.Append(" TeamId: ").Append(TeamId).Append("\n"); sb.Append(" Locale: ").Append(Locale).Append("\n"); + sb.Append(" Usage: ").Append(Usage).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -250,6 +259,11 @@ public bool Equals(AccountResponse input) this.Locale == input.Locale || (this.Locale != null && this.Locale.Equals(input.Locale)) + ) && + ( + this.Usage == input.Usage || + (this.Usage != null && + this.Usage.Equals(input.Usage)) ); } @@ -293,6 +307,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Locale.GetHashCode(); } + if (this.Usage != null) + { + hashCode = (hashCode * 59) + this.Usage.GetHashCode(); + } return hashCode; } } @@ -360,6 +378,12 @@ public List GetOpenApiTypes() Type = "string", Value = Locale, }); + types.Add(new OpenApiType(){ + Name = "usage", + Property = "Usage", + Type = "AccountResponseUsage", + Value = Usage, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs index 865219433..bf46598c7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs @@ -46,7 +46,8 @@ protected AccountResponseQuotas() { } /// Total API templates allowed.. /// API templates remaining.. /// SMS verifications remaining.. - public AccountResponseQuotas(int? apiSignatureRequestsLeft = default(int?), int? documentsLeft = default(int?), int? templatesTotal = default(int?), int? templatesLeft = default(int?), int? smsVerificationsLeft = default(int?)) + /// Number of fax pages left. + public AccountResponseQuotas(int? apiSignatureRequestsLeft = default(int?), int? documentsLeft = default(int?), int? templatesTotal = default(int?), int? templatesLeft = default(int?), int? smsVerificationsLeft = default(int?), int? numFaxPagesLeft = default(int?)) { this.ApiSignatureRequestsLeft = apiSignatureRequestsLeft; @@ -54,6 +55,7 @@ protected AccountResponseQuotas() { } this.TemplatesTotal = templatesTotal; this.TemplatesLeft = templatesLeft; this.SmsVerificationsLeft = smsVerificationsLeft; + this.NumFaxPagesLeft = numFaxPagesLeft; } /// @@ -107,6 +109,13 @@ public static AccountResponseQuotas Init(string jsonData) [DataMember(Name = "sms_verifications_left", EmitDefaultValue = true)] public int? SmsVerificationsLeft { get; set; } + /// + /// Number of fax pages left + /// + /// Number of fax pages left + [DataMember(Name = "num_fax_pages_left", EmitDefaultValue = true)] + public int? NumFaxPagesLeft { get; set; } + /// /// Returns the string presentation of the object /// @@ -120,6 +129,7 @@ public override string ToString() sb.Append(" TemplatesTotal: ").Append(TemplatesTotal).Append("\n"); sb.Append(" TemplatesLeft: ").Append(TemplatesLeft).Append("\n"); sb.Append(" SmsVerificationsLeft: ").Append(SmsVerificationsLeft).Append("\n"); + sb.Append(" NumFaxPagesLeft: ").Append(NumFaxPagesLeft).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -179,6 +189,11 @@ public bool Equals(AccountResponseQuotas input) this.SmsVerificationsLeft == input.SmsVerificationsLeft || (this.SmsVerificationsLeft != null && this.SmsVerificationsLeft.Equals(input.SmsVerificationsLeft)) + ) && + ( + this.NumFaxPagesLeft == input.NumFaxPagesLeft || + (this.NumFaxPagesLeft != null && + this.NumFaxPagesLeft.Equals(input.NumFaxPagesLeft)) ); } @@ -211,6 +226,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.SmsVerificationsLeft.GetHashCode(); } + if (this.NumFaxPagesLeft != null) + { + hashCode = (hashCode * 59) + this.NumFaxPagesLeft.GetHashCode(); + } return hashCode; } } @@ -248,6 +267,12 @@ public List GetOpenApiTypes() Type = "int?", Value = SmsVerificationsLeft, }); + types.Add(new OpenApiType(){ + Name = "num_fax_pages_left", + Property = "NumFaxPagesLeft", + Type = "int?", + Value = NumFaxPagesLeft, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseUsage.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseUsage.cs new file mode 100644 index 000000000..2a72141a5 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseUsage.cs @@ -0,0 +1,166 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// Details concerning monthly usage + /// + [DataContract(Name = "AccountResponseUsage")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class AccountResponseUsage : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AccountResponseUsage() { } + /// + /// Initializes a new instance of the class. + /// + /// Number of fax pages sent. + public AccountResponseUsage(int? faxPagesSent = default(int?)) + { + + this.FaxPagesSent = faxPagesSent; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static AccountResponseUsage Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of AccountResponseUsage"); + } + + return obj; + } + + /// + /// Number of fax pages sent + /// + /// Number of fax pages sent + [DataMember(Name = "fax_pages_sent", EmitDefaultValue = true)] + public int? FaxPagesSent { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AccountResponseUsage {\n"); + sb.Append(" FaxPagesSent: ").Append(FaxPagesSent).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AccountResponseUsage); + } + + /// + /// Returns true if AccountResponseUsage instances are equal + /// + /// Instance of AccountResponseUsage to be compared + /// Boolean + public bool Equals(AccountResponseUsage input) + { + if (input == null) + { + return false; + } + return + ( + this.FaxPagesSent == input.FaxPagesSent || + (this.FaxPagesSent != null && + this.FaxPagesSent.Equals(input.FaxPagesSent)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FaxPagesSent != null) + { + hashCode = (hashCode * 59) + this.FaxPagesSent.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "fax_pages_sent", + Property = "FaxPagesSent", + Type = "int?", + Value = FaxPagesSent, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/java-v1/README.md b/sdks/java-v1/README.md index a5ab19b6c..228374aac 100644 --- a/sdks/java-v1/README.md +++ b/sdks/java-v1/README.md @@ -55,7 +55,7 @@ Add this dependency to your project's POM: com.dropbox.sign dropbox-sign - 1.4-dev + 1.5-dev compile ``` @@ -71,7 +71,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:1.4-dev" + implementation "com.dropbox.sign:dropbox-sign:1.5-dev" } ``` @@ -85,7 +85,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-1.4-dev.jar` +- `target/dropbox-sign-1.5-dev.jar` - `target/lib/*.jar` ## Getting Started @@ -231,6 +231,7 @@ Class | Method | HTTP request | Description - [AccountGetResponse](docs/AccountGetResponse.md) - [AccountResponse](docs/AccountResponse.md) - [AccountResponseQuotas](docs/AccountResponseQuotas.md) + - [AccountResponseUsage](docs/AccountResponseUsage.md) - [AccountUpdateRequest](docs/AccountUpdateRequest.md) - [AccountVerifyRequest](docs/AccountVerifyRequest.md) - [AccountVerifyResponse](docs/AccountVerifyResponse.md) @@ -427,7 +428,7 @@ apisupport@hellosign.com This Java package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `3.0.0` - - Package version: `1.4-dev` + - Package version: `1.5-dev` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/sdks/java-v1/VERSION b/sdks/java-v1/VERSION index d918f457e..6f3dd2f48 100644 --- a/sdks/java-v1/VERSION +++ b/sdks/java-v1/VERSION @@ -1 +1 @@ -1.4-dev +1.5-dev diff --git a/sdks/java-v1/build.gradle b/sdks/java-v1/build.gradle index 8638be28f..5c563d2ab 100644 --- a/sdks/java-v1/build.gradle +++ b/sdks/java-v1/build.gradle @@ -20,7 +20,7 @@ apply plugin: 'signing' group = 'com.dropbox.sign' archivesBaseName = 'dropbox-sign' -version = '1.4-dev' +version = '1.5-dev' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/sdks/java-v1/build.sbt b/sdks/java-v1/build.sbt index 3c0d66315..391a42952 100644 --- a/sdks/java-v1/build.sbt +++ b/sdks/java-v1/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.dropbox.sign", name := "dropbox-sign", - version := "1.4-dev", + version := "1.5-dev", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), Compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/sdks/java-v1/docs/AccountResponse.md b/sdks/java-v1/docs/AccountResponse.md index ec745c905..e76348752 100644 --- a/sdks/java-v1/docs/AccountResponse.md +++ b/sdks/java-v1/docs/AccountResponse.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes | `roleCode` | ```String``` | The membership role for the team. | | | `teamId` | ```String``` | The id of the team account belongs to. | | | `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | +| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | diff --git a/sdks/java-v1/docs/AccountResponseQuotas.md b/sdks/java-v1/docs/AccountResponseQuotas.md index 10c475281..c591ff814 100644 --- a/sdks/java-v1/docs/AccountResponseQuotas.md +++ b/sdks/java-v1/docs/AccountResponseQuotas.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes | `templatesTotal` | ```Integer``` | Total API templates allowed. | | | `templatesLeft` | ```Integer``` | API templates remaining. | | | `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | +| `numFaxPagesLeft` | ```Integer``` | Number of fax pages left | | diff --git a/sdks/java-v1/docs/AccountResponseUsage.md b/sdks/java-v1/docs/AccountResponseUsage.md new file mode 100644 index 000000000..f9f367135 --- /dev/null +++ b/sdks/java-v1/docs/AccountResponseUsage.md @@ -0,0 +1,14 @@ + + +# AccountResponseUsage + +Details concerning monthly usage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxPagesSent` | ```Integer``` | Number of fax pages sent | | + + + diff --git a/sdks/java-v1/gradle.properties b/sdks/java-v1/gradle.properties index 20854c004..e1df21108 100644 --- a/sdks/java-v1/gradle.properties +++ b/sdks/java-v1/gradle.properties @@ -6,7 +6,7 @@ #target = android GROUP=com.dropbox.sign POM_ARTIFACT_ID=dropbox-sign -VERSION_NAME=1.4-dev +VERSION_NAME=1.5-dev POM_NAME=Dropbox Sign Java SDK POM_DESCRIPTION=Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! diff --git a/sdks/java-v1/openapi-config.yaml b/sdks/java-v1/openapi-config.yaml index 3ecd3138c..1694a694f 100644 --- a/sdks/java-v1/openapi-config.yaml +++ b/sdks/java-v1/openapi-config.yaml @@ -16,7 +16,7 @@ additionalProperties: groupId: com.dropbox.sign artifactId: dropbox-sign artifactName: Dropbox Sign Java SDK - artifactVersion: "1.4-dev" + artifactVersion: "1.5-dev" artifactUrl: https://github.com/hellosign/dropbox-sign-java artifactDescription: Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! scmConnection: scm:git:git://github.com/hellosign/dropbox-sign-java.git diff --git a/sdks/java-v1/pom.xml b/sdks/java-v1/pom.xml index 163720a31..6a4d3d974 100644 --- a/sdks/java-v1/pom.xml +++ b/sdks/java-v1/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 1.4-dev + 1.5-dev https://github.com/hellosign/dropbox-sign-java Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java index f18525b6c..2dc3d7505 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java @@ -136,7 +136,7 @@ public ApiClient(Map authMap) { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/1.4-dev/java"); + setUserAgent("OpenAPI-Generator/1.5-dev/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap(); diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java index 79695fa74..65f2550ab 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java @@ -18,6 +18,7 @@ import java.util.Map; import java.util.HashMap; import com.dropbox.sign.model.AccountResponseQuotas; +import com.dropbox.sign.model.AccountResponseUsage; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -45,7 +46,8 @@ AccountResponse.JSON_PROPERTY_CALLBACK_URL, AccountResponse.JSON_PROPERTY_ROLE_CODE, AccountResponse.JSON_PROPERTY_TEAM_ID, - AccountResponse.JSON_PROPERTY_LOCALE + AccountResponse.JSON_PROPERTY_LOCALE, + AccountResponse.JSON_PROPERTY_USAGE }) @JsonIgnoreProperties(ignoreUnknown=true) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -80,6 +82,9 @@ public class AccountResponse { public static final String JSON_PROPERTY_LOCALE = "locale"; private String locale; + public static final String JSON_PROPERTY_USAGE = "usage"; + private AccountResponseUsage usage; + public AccountResponse() { } @@ -358,6 +363,32 @@ public void setLocale(String locale) { } + public AccountResponse usage(AccountResponseUsage usage) { + this.usage = usage; + return this; + } + + /** + * Get usage + * @return usage + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountResponseUsage getUsage() { + return usage; + } + + + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsage(AccountResponseUsage usage) { + this.usage = usage; + } + + /** * Return true if this AccountResponse object is equal to o. */ @@ -379,12 +410,13 @@ public boolean equals(Object o) { Objects.equals(this.callbackUrl, accountResponse.callbackUrl) && Objects.equals(this.roleCode, accountResponse.roleCode) && Objects.equals(this.teamId, accountResponse.teamId) && - Objects.equals(this.locale, accountResponse.locale); + Objects.equals(this.locale, accountResponse.locale) && + Objects.equals(this.usage, accountResponse.usage); } @Override public int hashCode() { - return Objects.hash(accountId, emailAddress, isLocked, isPaidHs, isPaidHf, quotas, callbackUrl, roleCode, teamId, locale); + return Objects.hash(accountId, emailAddress, isLocked, isPaidHs, isPaidHf, quotas, callbackUrl, roleCode, teamId, locale, usage); } @Override @@ -401,6 +433,7 @@ public String toString() { sb.append(" roleCode: ").append(toIndentedString(roleCode)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); + sb.append(" usage: ").append(toIndentedString(usage)).append("\n"); sb.append("}"); return sb.toString(); } @@ -599,6 +632,25 @@ public Map createFormData() throws ApiException { map.put("locale", JSON.getDefault().getMapper().writeValueAsString(locale)); } } + if (usage != null) { + if (isFileTypeOrListOfFiles(usage)) { + fileTypeFound = true; + } + + if (usage.getClass().equals(java.io.File.class) || + usage.getClass().equals(Integer.class) || + usage.getClass().equals(String.class) || + usage.getClass().isEnum()) { + map.put("usage", usage); + } else if (isListOfFile(usage)) { + for(int i = 0; i< getListSize(usage); i++) { + map.put("usage[" + i + "]", getFromList(usage, i)); + } + } + else { + map.put("usage", JSON.getDefault().getMapper().writeValueAsString(usage)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java index cb9f824ea..e0ca922ba 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java @@ -40,7 +40,8 @@ AccountResponseQuotas.JSON_PROPERTY_DOCUMENTS_LEFT, AccountResponseQuotas.JSON_PROPERTY_TEMPLATES_TOTAL, AccountResponseQuotas.JSON_PROPERTY_TEMPLATES_LEFT, - AccountResponseQuotas.JSON_PROPERTY_SMS_VERIFICATIONS_LEFT + AccountResponseQuotas.JSON_PROPERTY_SMS_VERIFICATIONS_LEFT, + AccountResponseQuotas.JSON_PROPERTY_NUM_FAX_PAGES_LEFT }) @JsonIgnoreProperties(ignoreUnknown=true) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -60,6 +61,9 @@ public class AccountResponseQuotas { public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; private Integer smsVerificationsLeft; + public static final String JSON_PROPERTY_NUM_FAX_PAGES_LEFT = "num_fax_pages_left"; + private Integer numFaxPagesLeft; + public AccountResponseQuotas() { } @@ -208,6 +212,32 @@ public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { } + public AccountResponseQuotas numFaxPagesLeft(Integer numFaxPagesLeft) { + this.numFaxPagesLeft = numFaxPagesLeft; + return this; + } + + /** + * Number of fax pages left + * @return numFaxPagesLeft + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Number of fax pages left") + @JsonProperty(JSON_PROPERTY_NUM_FAX_PAGES_LEFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getNumFaxPagesLeft() { + return numFaxPagesLeft; + } + + + @JsonProperty(JSON_PROPERTY_NUM_FAX_PAGES_LEFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumFaxPagesLeft(Integer numFaxPagesLeft) { + this.numFaxPagesLeft = numFaxPagesLeft; + } + + /** * Return true if this AccountResponseQuotas object is equal to o. */ @@ -224,12 +254,13 @@ public boolean equals(Object o) { Objects.equals(this.documentsLeft, accountResponseQuotas.documentsLeft) && Objects.equals(this.templatesTotal, accountResponseQuotas.templatesTotal) && Objects.equals(this.templatesLeft, accountResponseQuotas.templatesLeft) && - Objects.equals(this.smsVerificationsLeft, accountResponseQuotas.smsVerificationsLeft); + Objects.equals(this.smsVerificationsLeft, accountResponseQuotas.smsVerificationsLeft) && + Objects.equals(this.numFaxPagesLeft, accountResponseQuotas.numFaxPagesLeft); } @Override public int hashCode() { - return Objects.hash(apiSignatureRequestsLeft, documentsLeft, templatesTotal, templatesLeft, smsVerificationsLeft); + return Objects.hash(apiSignatureRequestsLeft, documentsLeft, templatesTotal, templatesLeft, smsVerificationsLeft, numFaxPagesLeft); } @Override @@ -241,6 +272,7 @@ public String toString() { sb.append(" templatesTotal: ").append(toIndentedString(templatesTotal)).append("\n"); sb.append(" templatesLeft: ").append(toIndentedString(templatesLeft)).append("\n"); sb.append(" smsVerificationsLeft: ").append(toIndentedString(smsVerificationsLeft)).append("\n"); + sb.append(" numFaxPagesLeft: ").append(toIndentedString(numFaxPagesLeft)).append("\n"); sb.append("}"); return sb.toString(); } @@ -344,6 +376,25 @@ public Map createFormData() throws ApiException { map.put("sms_verifications_left", JSON.getDefault().getMapper().writeValueAsString(smsVerificationsLeft)); } } + if (numFaxPagesLeft != null) { + if (isFileTypeOrListOfFiles(numFaxPagesLeft)) { + fileTypeFound = true; + } + + if (numFaxPagesLeft.getClass().equals(java.io.File.class) || + numFaxPagesLeft.getClass().equals(Integer.class) || + numFaxPagesLeft.getClass().equals(String.class) || + numFaxPagesLeft.getClass().isEnum()) { + map.put("num_fax_pages_left", numFaxPagesLeft); + } else if (isListOfFile(numFaxPagesLeft)) { + for(int i = 0; i< getListSize(numFaxPagesLeft); i++) { + map.put("num_fax_pages_left[" + i + "]", getFromList(numFaxPagesLeft, i)); + } + } + else { + map.put("num_fax_pages_left", JSON.getDefault().getMapper().writeValueAsString(numFaxPagesLeft)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java new file mode 100644 index 000000000..6de334090 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java @@ -0,0 +1,182 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * Details concerning monthly usage + */ +@ApiModel(description = "Details concerning monthly usage") +@JsonPropertyOrder({ + AccountResponseUsage.JSON_PROPERTY_FAX_PAGES_SENT +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountResponseUsage { + public static final String JSON_PROPERTY_FAX_PAGES_SENT = "fax_pages_sent"; + private Integer faxPagesSent; + + public AccountResponseUsage() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public AccountResponseUsage init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, AccountResponseUsage.class); + } + + static public AccountResponseUsage init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + AccountResponseUsage.class + ); + } + + public AccountResponseUsage faxPagesSent(Integer faxPagesSent) { + this.faxPagesSent = faxPagesSent; + return this; + } + + /** + * Number of fax pages sent + * @return faxPagesSent + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Number of fax pages sent") + @JsonProperty(JSON_PROPERTY_FAX_PAGES_SENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFaxPagesSent() { + return faxPagesSent; + } + + + @JsonProperty(JSON_PROPERTY_FAX_PAGES_SENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFaxPagesSent(Integer faxPagesSent) { + this.faxPagesSent = faxPagesSent; + } + + + /** + * Return true if this AccountResponseUsage object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountResponseUsage accountResponseUsage = (AccountResponseUsage) o; + return Objects.equals(this.faxPagesSent, accountResponseUsage.faxPagesSent); + } + + @Override + public int hashCode() { + return Objects.hash(faxPagesSent); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountResponseUsage {\n"); + sb.append(" faxPagesSent: ").append(toIndentedString(faxPagesSent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (faxPagesSent != null) { + if (isFileTypeOrListOfFiles(faxPagesSent)) { + fileTypeFound = true; + } + + if (faxPagesSent.getClass().equals(java.io.File.class) || + faxPagesSent.getClass().equals(Integer.class) || + faxPagesSent.getClass().equals(String.class) || + faxPagesSent.getClass().isEnum()) { + map.put("fax_pages_sent", faxPagesSent); + } else if (isListOfFile(faxPagesSent)) { + for(int i = 0; i< getListSize(faxPagesSent); i++) { + map.put("fax_pages_sent[" + i + "]", getFromList(faxPagesSent, i)); + } + } + else { + map.put("fax_pages_sent", JSON.getDefault().getMapper().writeValueAsString(faxPagesSent)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * 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 "); + } + +} + diff --git a/sdks/java-v2/README.md b/sdks/java-v2/README.md index 780cf93ff..2453f49d3 100644 --- a/sdks/java-v2/README.md +++ b/sdks/java-v2/README.md @@ -56,7 +56,7 @@ Add this dependency to your project's POM: com.dropbox.sign dropbox-sign - 2.0-dev + 2.1-dev compile ``` @@ -72,7 +72,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:2.0-dev" + implementation "com.dropbox.sign:dropbox-sign:2.1-dev" } ``` @@ -86,7 +86,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-2.0-dev.jar` +- `target/dropbox-sign-2.1-dev.jar` - `target/lib/*.jar` ## Getting Started @@ -232,6 +232,7 @@ Class | Method | HTTP request | Description - [AccountGetResponse](docs/AccountGetResponse.md) - [AccountResponse](docs/AccountResponse.md) - [AccountResponseQuotas](docs/AccountResponseQuotas.md) + - [AccountResponseUsage](docs/AccountResponseUsage.md) - [AccountUpdateRequest](docs/AccountUpdateRequest.md) - [AccountVerifyRequest](docs/AccountVerifyRequest.md) - [AccountVerifyResponse](docs/AccountVerifyResponse.md) @@ -428,7 +429,7 @@ apisupport@hellosign.com This Java package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `3.0.0` - - Package version: `2.0-dev` + - Package version: `2.1-dev` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/sdks/java-v2/VERSION b/sdks/java-v2/VERSION index c3bb52e88..35468ac2c 100644 --- a/sdks/java-v2/VERSION +++ b/sdks/java-v2/VERSION @@ -1 +1 @@ -2.0-dev +2.1-dev diff --git a/sdks/java-v2/build.gradle b/sdks/java-v2/build.gradle index 028d9d3b4..2f3c23340 100644 --- a/sdks/java-v2/build.gradle +++ b/sdks/java-v2/build.gradle @@ -20,7 +20,7 @@ apply plugin: 'signing' group = 'com.dropbox.sign' archivesBaseName = 'dropbox-sign' -version = '2.0-dev' +version = '2.1-dev' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/sdks/java-v2/build.sbt b/sdks/java-v2/build.sbt index 4b7d8c635..2fe727ca9 100644 --- a/sdks/java-v2/build.sbt +++ b/sdks/java-v2/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.dropbox.sign", name := "dropbox-sign", - version := "2.0-dev", + version := "2.1-dev", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), Compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/sdks/java-v2/docs/AccountResponse.md b/sdks/java-v2/docs/AccountResponse.md index ec745c905..e76348752 100644 --- a/sdks/java-v2/docs/AccountResponse.md +++ b/sdks/java-v2/docs/AccountResponse.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes | `roleCode` | ```String``` | The membership role for the team. | | | `teamId` | ```String``` | The id of the team account belongs to. | | | `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | +| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | diff --git a/sdks/java-v2/docs/AccountResponseQuotas.md b/sdks/java-v2/docs/AccountResponseQuotas.md index 10c475281..c591ff814 100644 --- a/sdks/java-v2/docs/AccountResponseQuotas.md +++ b/sdks/java-v2/docs/AccountResponseQuotas.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes | `templatesTotal` | ```Integer``` | Total API templates allowed. | | | `templatesLeft` | ```Integer``` | API templates remaining. | | | `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | +| `numFaxPagesLeft` | ```Integer``` | Number of fax pages left | | diff --git a/sdks/java-v2/docs/AccountResponseUsage.md b/sdks/java-v2/docs/AccountResponseUsage.md new file mode 100644 index 000000000..f9f367135 --- /dev/null +++ b/sdks/java-v2/docs/AccountResponseUsage.md @@ -0,0 +1,14 @@ + + +# AccountResponseUsage + +Details concerning monthly usage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxPagesSent` | ```Integer``` | Number of fax pages sent | | + + + diff --git a/sdks/java-v2/gradle.properties b/sdks/java-v2/gradle.properties index 9226525cb..9fb39c443 100644 --- a/sdks/java-v2/gradle.properties +++ b/sdks/java-v2/gradle.properties @@ -6,7 +6,7 @@ #target = android GROUP=com.dropbox.sign POM_ARTIFACT_ID=dropbox-sign -VERSION_NAME=2.0-dev +VERSION_NAME=2.1-dev POM_NAME=Dropbox Sign Java SDK POM_DESCRIPTION=Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! diff --git a/sdks/java-v2/openapi-config.yaml b/sdks/java-v2/openapi-config.yaml index 8f1d46807..36135d101 100644 --- a/sdks/java-v2/openapi-config.yaml +++ b/sdks/java-v2/openapi-config.yaml @@ -20,7 +20,7 @@ additionalProperties: groupId: com.dropbox.sign artifactId: dropbox-sign artifactName: Dropbox Sign Java SDK - artifactVersion: "2.0-dev" + artifactVersion: "2.1-dev" artifactUrl: https://github.com/hellosign/dropbox-sign-java artifactDescription: Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! scmConnection: scm:git:git://github.com/hellosign/dropbox-sign-java.git diff --git a/sdks/java-v2/pom.xml b/sdks/java-v2/pom.xml index 1912dcd69..1a4319e2d 100644 --- a/sdks/java-v2/pom.xml +++ b/sdks/java-v2/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 2.0-dev + 2.1-dev https://github.com/hellosign/dropbox-sign-java Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java index cfb3cfb0c..67d6f7e2f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java @@ -147,7 +147,7 @@ public ApiClient(Map authMap) { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2.0-dev/java"); + setUserAgent("OpenAPI-Generator/2.1-dev/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<>(); diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponse.java index f77d3f7ce..0a327b98c 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponse.java @@ -17,6 +17,7 @@ import java.util.Map; import java.util.HashMap; import com.dropbox.sign.model.AccountResponseQuotas; +import com.dropbox.sign.model.AccountResponseUsage; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -45,7 +46,8 @@ AccountResponse.JSON_PROPERTY_CALLBACK_URL, AccountResponse.JSON_PROPERTY_ROLE_CODE, AccountResponse.JSON_PROPERTY_TEAM_ID, - AccountResponse.JSON_PROPERTY_LOCALE + AccountResponse.JSON_PROPERTY_LOCALE, + AccountResponse.JSON_PROPERTY_USAGE }) @JsonIgnoreProperties(ignoreUnknown=true) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -80,6 +82,9 @@ public class AccountResponse { public static final String JSON_PROPERTY_LOCALE = "locale"; private String locale; + public static final String JSON_PROPERTY_USAGE = "usage"; + private AccountResponseUsage usage; + public AccountResponse() { } @@ -358,6 +363,32 @@ public void setLocale(String locale) { } + public AccountResponse usage(AccountResponseUsage usage) { + this.usage = usage; + return this; + } + + /** + * Get usage + * @return usage + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountResponseUsage getUsage() { + return usage; + } + + + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsage(AccountResponseUsage usage) { + this.usage = usage; + } + + /** * Return true if this AccountResponse object is equal to o. */ @@ -379,12 +410,13 @@ public boolean equals(Object o) { Objects.equals(this.callbackUrl, accountResponse.callbackUrl) && Objects.equals(this.roleCode, accountResponse.roleCode) && Objects.equals(this.teamId, accountResponse.teamId) && - Objects.equals(this.locale, accountResponse.locale); + Objects.equals(this.locale, accountResponse.locale) && + Objects.equals(this.usage, accountResponse.usage); } @Override public int hashCode() { - return Objects.hash(accountId, emailAddress, isLocked, isPaidHs, isPaidHf, quotas, callbackUrl, roleCode, teamId, locale); + return Objects.hash(accountId, emailAddress, isLocked, isPaidHs, isPaidHf, quotas, callbackUrl, roleCode, teamId, locale, usage); } @Override @@ -401,6 +433,7 @@ public String toString() { sb.append(" roleCode: ").append(toIndentedString(roleCode)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); + sb.append(" usage: ").append(toIndentedString(usage)).append("\n"); sb.append("}"); return sb.toString(); } @@ -599,6 +632,25 @@ public Map createFormData() throws ApiException { map.put("locale", JSON.getDefault().getMapper().writeValueAsString(locale)); } } + if (usage != null) { + if (isFileTypeOrListOfFiles(usage)) { + fileTypeFound = true; + } + + if (usage.getClass().equals(java.io.File.class) || + usage.getClass().equals(Integer.class) || + usage.getClass().equals(String.class) || + usage.getClass().isEnum()) { + map.put("usage", usage); + } else if (isListOfFile(usage)) { + for(int i = 0; i< getListSize(usage); i++) { + map.put("usage[" + i + "]", getFromList(usage, i)); + } + } + else { + map.put("usage", JSON.getDefault().getMapper().writeValueAsString(usage)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java index edfc67f5c..cd1fcbf91 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java @@ -40,7 +40,8 @@ AccountResponseQuotas.JSON_PROPERTY_DOCUMENTS_LEFT, AccountResponseQuotas.JSON_PROPERTY_TEMPLATES_TOTAL, AccountResponseQuotas.JSON_PROPERTY_TEMPLATES_LEFT, - AccountResponseQuotas.JSON_PROPERTY_SMS_VERIFICATIONS_LEFT + AccountResponseQuotas.JSON_PROPERTY_SMS_VERIFICATIONS_LEFT, + AccountResponseQuotas.JSON_PROPERTY_NUM_FAX_PAGES_LEFT }) @JsonIgnoreProperties(ignoreUnknown=true) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -60,6 +61,9 @@ public class AccountResponseQuotas { public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; private Integer smsVerificationsLeft; + public static final String JSON_PROPERTY_NUM_FAX_PAGES_LEFT = "num_fax_pages_left"; + private Integer numFaxPagesLeft; + public AccountResponseQuotas() { } @@ -208,6 +212,32 @@ public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { } + public AccountResponseQuotas numFaxPagesLeft(Integer numFaxPagesLeft) { + this.numFaxPagesLeft = numFaxPagesLeft; + return this; + } + + /** + * Number of fax pages left + * @return numFaxPagesLeft + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Number of fax pages left") + @JsonProperty(JSON_PROPERTY_NUM_FAX_PAGES_LEFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getNumFaxPagesLeft() { + return numFaxPagesLeft; + } + + + @JsonProperty(JSON_PROPERTY_NUM_FAX_PAGES_LEFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumFaxPagesLeft(Integer numFaxPagesLeft) { + this.numFaxPagesLeft = numFaxPagesLeft; + } + + /** * Return true if this AccountResponseQuotas object is equal to o. */ @@ -224,12 +254,13 @@ public boolean equals(Object o) { Objects.equals(this.documentsLeft, accountResponseQuotas.documentsLeft) && Objects.equals(this.templatesTotal, accountResponseQuotas.templatesTotal) && Objects.equals(this.templatesLeft, accountResponseQuotas.templatesLeft) && - Objects.equals(this.smsVerificationsLeft, accountResponseQuotas.smsVerificationsLeft); + Objects.equals(this.smsVerificationsLeft, accountResponseQuotas.smsVerificationsLeft) && + Objects.equals(this.numFaxPagesLeft, accountResponseQuotas.numFaxPagesLeft); } @Override public int hashCode() { - return Objects.hash(apiSignatureRequestsLeft, documentsLeft, templatesTotal, templatesLeft, smsVerificationsLeft); + return Objects.hash(apiSignatureRequestsLeft, documentsLeft, templatesTotal, templatesLeft, smsVerificationsLeft, numFaxPagesLeft); } @Override @@ -241,6 +272,7 @@ public String toString() { sb.append(" templatesTotal: ").append(toIndentedString(templatesTotal)).append("\n"); sb.append(" templatesLeft: ").append(toIndentedString(templatesLeft)).append("\n"); sb.append(" smsVerificationsLeft: ").append(toIndentedString(smsVerificationsLeft)).append("\n"); + sb.append(" numFaxPagesLeft: ").append(toIndentedString(numFaxPagesLeft)).append("\n"); sb.append("}"); return sb.toString(); } @@ -344,6 +376,25 @@ public Map createFormData() throws ApiException { map.put("sms_verifications_left", JSON.getDefault().getMapper().writeValueAsString(smsVerificationsLeft)); } } + if (numFaxPagesLeft != null) { + if (isFileTypeOrListOfFiles(numFaxPagesLeft)) { + fileTypeFound = true; + } + + if (numFaxPagesLeft.getClass().equals(java.io.File.class) || + numFaxPagesLeft.getClass().equals(Integer.class) || + numFaxPagesLeft.getClass().equals(String.class) || + numFaxPagesLeft.getClass().isEnum()) { + map.put("num_fax_pages_left", numFaxPagesLeft); + } else if (isListOfFile(numFaxPagesLeft)) { + for(int i = 0; i< getListSize(numFaxPagesLeft); i++) { + map.put("num_fax_pages_left[" + i + "]", getFromList(numFaxPagesLeft, i)); + } + } + else { + map.put("num_fax_pages_left", JSON.getDefault().getMapper().writeValueAsString(numFaxPagesLeft)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java new file mode 100644 index 000000000..ac1979e1e --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java @@ -0,0 +1,182 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * Details concerning monthly usage + */ +@ApiModel(description = "Details concerning monthly usage") +@JsonPropertyOrder({ + AccountResponseUsage.JSON_PROPERTY_FAX_PAGES_SENT +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountResponseUsage { + public static final String JSON_PROPERTY_FAX_PAGES_SENT = "fax_pages_sent"; + private Integer faxPagesSent; + + public AccountResponseUsage() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public AccountResponseUsage init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, AccountResponseUsage.class); + } + + static public AccountResponseUsage init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + AccountResponseUsage.class + ); + } + + public AccountResponseUsage faxPagesSent(Integer faxPagesSent) { + this.faxPagesSent = faxPagesSent; + return this; + } + + /** + * Number of fax pages sent + * @return faxPagesSent + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Number of fax pages sent") + @JsonProperty(JSON_PROPERTY_FAX_PAGES_SENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFaxPagesSent() { + return faxPagesSent; + } + + + @JsonProperty(JSON_PROPERTY_FAX_PAGES_SENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFaxPagesSent(Integer faxPagesSent) { + this.faxPagesSent = faxPagesSent; + } + + + /** + * Return true if this AccountResponseUsage object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountResponseUsage accountResponseUsage = (AccountResponseUsage) o; + return Objects.equals(this.faxPagesSent, accountResponseUsage.faxPagesSent); + } + + @Override + public int hashCode() { + return Objects.hash(faxPagesSent); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountResponseUsage {\n"); + sb.append(" faxPagesSent: ").append(toIndentedString(faxPagesSent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (faxPagesSent != null) { + if (isFileTypeOrListOfFiles(faxPagesSent)) { + fileTypeFound = true; + } + + if (faxPagesSent.getClass().equals(java.io.File.class) || + faxPagesSent.getClass().equals(Integer.class) || + faxPagesSent.getClass().equals(String.class) || + faxPagesSent.getClass().isEnum()) { + map.put("fax_pages_sent", faxPagesSent); + } else if (isListOfFile(faxPagesSent)) { + for(int i = 0; i< getListSize(faxPagesSent); i++) { + map.put("fax_pages_sent[" + i + "]", getFromList(faxPagesSent, i)); + } + } + else { + map.put("fax_pages_sent", JSON.getDefault().getMapper().writeValueAsString(faxPagesSent)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * 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 "); + } + +} + diff --git a/sdks/node/README.md b/sdks/node/README.md index caa493dd3..0d019cc7a 100644 --- a/sdks/node/README.md +++ b/sdks/node/README.md @@ -172,6 +172,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [AccountGetResponse](./docs/model/AccountGetResponse.md) - [AccountResponse](./docs/model/AccountResponse.md) - [AccountResponseQuotas](./docs/model/AccountResponseQuotas.md) +- [AccountResponseUsage](./docs/model/AccountResponseUsage.md) - [AccountUpdateRequest](./docs/model/AccountUpdateRequest.md) - [AccountVerifyRequest](./docs/model/AccountVerifyRequest.md) - [AccountVerifyResponse](./docs/model/AccountVerifyResponse.md) diff --git a/sdks/node/VERSION b/sdks/node/VERSION index d918f457e..6f3dd2f48 100644 --- a/sdks/node/VERSION +++ b/sdks/node/VERSION @@ -1 +1 @@ -1.4-dev +1.5-dev diff --git a/sdks/node/api/apis.ts b/sdks/node/api/apis.ts index d30e8a6f9..40be80373 100644 --- a/sdks/node/api/apis.ts +++ b/sdks/node/api/apis.ts @@ -39,7 +39,7 @@ export const queryParamsSerializer = (params) => { export { RequestFile } from "../model"; -export const USER_AGENT = "OpenAPI-Generator/1.4-dev/node"; +export const USER_AGENT = "OpenAPI-Generator/1.5-dev/node"; /** * Generates an object containing form data. diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 6dbf3c328..bb1cd3b0d 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -12559,6 +12559,7 @@ __export(api_exports, { AccountGetResponse: () => AccountGetResponse, AccountResponse: () => AccountResponse, AccountResponseQuotas: () => AccountResponseQuotas, + AccountResponseUsage: () => AccountResponseUsage, AccountUpdateRequest: () => AccountUpdateRequest, AccountVerifyRequest: () => AccountVerifyRequest, AccountVerifyResponse: () => AccountVerifyResponse, @@ -15781,6 +15782,11 @@ AccountResponse.attributeTypeMap = [ name: "locale", baseName: "locale", type: "string" + }, + { + name: "usage", + baseName: "usage", + type: "AccountResponseUsage" } ]; @@ -15820,6 +15826,30 @@ AccountResponseQuotas.attributeTypeMap = [ name: "smsVerificationsLeft", baseName: "sms_verifications_left", type: "number" + }, + { + name: "numFaxPagesLeft", + baseName: "num_fax_pages_left", + type: "number" + } +]; + +// model/accountResponseUsage.ts +var _AccountResponseUsage = class { + static getAttributeTypeMap() { + return _AccountResponseUsage.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "AccountResponseUsage"); + } +}; +var AccountResponseUsage = _AccountResponseUsage; +AccountResponseUsage.discriminator = void 0; +AccountResponseUsage.attributeTypeMap = [ + { + name: "faxPagesSent", + baseName: "fax_pages_sent", + type: "number" } ]; @@ -23378,6 +23408,7 @@ var typeMap = { AccountGetResponse, AccountResponse, AccountResponseQuotas, + AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, @@ -30614,7 +30645,7 @@ var HttpError = class extends Error { var queryParamsSerializer = (params) => { return import_qs.default.stringify(params, { arrayFormat: "brackets" }); }; -var USER_AGENT = "OpenAPI-Generator/1.4-dev/node"; +var USER_AGENT = "OpenAPI-Generator/1.5-dev/node"; var generateFormData = (obj, typemap) => { const data = {}; let localVarUseFormData = false; @@ -30694,6 +30725,7 @@ var APIS = [ AccountGetResponse, AccountResponse, AccountResponseQuotas, + AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, diff --git a/sdks/node/docs/model/AccountResponse.md b/sdks/node/docs/model/AccountResponse.md index a642cee4a..b24e1638f 100644 --- a/sdks/node/docs/model/AccountResponse.md +++ b/sdks/node/docs/model/AccountResponse.md @@ -16,5 +16,6 @@ Name | Type | Description | Notes | `roleCode` | ```string``` | The membership role for the team. | | | `teamId` | ```string``` | The id of the team account belongs to. | | | `locale` | ```string``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | +| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/AccountResponseQuotas.md b/sdks/node/docs/model/AccountResponseQuotas.md index d285ef2fb..55beed9cb 100644 --- a/sdks/node/docs/model/AccountResponseQuotas.md +++ b/sdks/node/docs/model/AccountResponseQuotas.md @@ -11,5 +11,6 @@ Name | Type | Description | Notes | `templatesTotal` | ```number``` | Total API templates allowed. | | | `templatesLeft` | ```number``` | API templates remaining. | | | `smsVerificationsLeft` | ```number``` | SMS verifications remaining. | | +| `numFaxPagesLeft` | ```number``` | Number of fax pages left | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/AccountResponseUsage.md b/sdks/node/docs/model/AccountResponseUsage.md new file mode 100644 index 000000000..2f095fba9 --- /dev/null +++ b/sdks/node/docs/model/AccountResponseUsage.md @@ -0,0 +1,11 @@ +# # AccountResponseUsage + +Details concerning monthly usage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxPagesSent` | ```number``` | Number of fax pages sent | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/model/accountResponse.ts b/sdks/node/model/accountResponse.ts index b5588056d..5173bbcac 100644 --- a/sdks/node/model/accountResponse.ts +++ b/sdks/node/model/accountResponse.ts @@ -24,6 +24,7 @@ import { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; import { AccountResponseQuotas } from "./accountResponseQuotas"; +import { AccountResponseUsage } from "./accountResponseUsage"; export class AccountResponse { /** @@ -63,6 +64,7 @@ export class AccountResponse { * The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. */ "locale"?: string | null; + "usage"?: AccountResponseUsage; static discriminator: string | undefined = undefined; @@ -117,6 +119,11 @@ export class AccountResponse { baseName: "locale", type: "string", }, + { + name: "usage", + baseName: "usage", + type: "AccountResponseUsage", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/accountResponseQuotas.ts b/sdks/node/model/accountResponseQuotas.ts index dd62ddef3..d831c6101 100644 --- a/sdks/node/model/accountResponseQuotas.ts +++ b/sdks/node/model/accountResponseQuotas.ts @@ -48,6 +48,10 @@ export class AccountResponseQuotas { * SMS verifications remaining. */ "smsVerificationsLeft"?: number | null; + /** + * Number of fax pages left + */ + "numFaxPagesLeft"?: number | null; static discriminator: string | undefined = undefined; @@ -77,6 +81,11 @@ export class AccountResponseQuotas { baseName: "sms_verifications_left", type: "number", }, + { + name: "numFaxPagesLeft", + baseName: "num_fax_pages_left", + type: "number", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/accountResponseUsage.ts b/sdks/node/model/accountResponseUsage.ts new file mode 100644 index 000000000..8c19a17f5 --- /dev/null +++ b/sdks/node/model/accountResponseUsage.ts @@ -0,0 +1,54 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; + +/** + * Details concerning monthly usage + */ +export class AccountResponseUsage { + /** + * Number of fax pages sent + */ + "faxPagesSent"?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "faxPagesSent", + baseName: "fax_pages_sent", + type: "number", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return AccountResponseUsage.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): AccountResponseUsage { + return ObjectSerializer.deserialize(data, "AccountResponseUsage"); + } +} diff --git a/sdks/node/model/index.ts b/sdks/node/model/index.ts index edb86a0de..60062191f 100644 --- a/sdks/node/model/index.ts +++ b/sdks/node/model/index.ts @@ -3,6 +3,7 @@ import { AccountCreateResponse } from "./accountCreateResponse"; import { AccountGetResponse } from "./accountGetResponse"; import { AccountResponse } from "./accountResponse"; import { AccountResponseQuotas } from "./accountResponseQuotas"; +import { AccountResponseUsage } from "./accountResponseUsage"; import { AccountUpdateRequest } from "./accountUpdateRequest"; import { AccountVerifyRequest } from "./accountVerifyRequest"; import { AccountVerifyResponse } from "./accountVerifyResponse"; @@ -233,6 +234,7 @@ export let typeMap: { [index: string]: any } = { AccountGetResponse: AccountGetResponse, AccountResponse: AccountResponse, AccountResponseQuotas: AccountResponseQuotas, + AccountResponseUsage: AccountResponseUsage, AccountUpdateRequest: AccountUpdateRequest, AccountVerifyRequest: AccountVerifyRequest, AccountVerifyResponse: AccountVerifyResponse, @@ -441,6 +443,7 @@ export { AccountGetResponse, AccountResponse, AccountResponseQuotas, + AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, diff --git a/sdks/node/openapi-config.yaml b/sdks/node/openapi-config.yaml index 7f13d369a..63b2675d6 100644 --- a/sdks/node/openapi-config.yaml +++ b/sdks/node/openapi-config.yaml @@ -2,7 +2,7 @@ generatorName: typescript-node typeMappings: {} additionalProperties: npmName: "@dropbox/sign" - npmVersion: 1.4-dev + npmVersion: 1.5-dev supportsES6: true apiDocPath: ./docs/api modelDocPath: ./docs/model diff --git a/sdks/node/package-lock.json b/sdks/node/package-lock.json index 000bef68e..42bbb09ee 100644 --- a/sdks/node/package-lock.json +++ b/sdks/node/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dropbox/sign", - "version": "1.4-dev", + "version": "1.5-dev", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dropbox/sign", - "version": "1.4-dev", + "version": "1.5-dev", "dependencies": { "axios": "^1.6.0", "bluebird": "^3.5.0", diff --git a/sdks/node/package.json b/sdks/node/package.json index e3a1ace7b..b27f4f763 100644 --- a/sdks/node/package.json +++ b/sdks/node/package.json @@ -1,6 +1,6 @@ { "name": "@dropbox/sign", - "version": "1.4-dev", + "version": "1.5-dev", "description": "Official Node client for Dropbox Sign", "repository": { "type": "git", diff --git a/sdks/node/types/api/apis.d.ts b/sdks/node/types/api/apis.d.ts index c351e12c4..1d1ccb66b 100644 --- a/sdks/node/types/api/apis.d.ts +++ b/sdks/node/types/api/apis.d.ts @@ -22,7 +22,7 @@ export interface returnTypeI { } export declare const queryParamsSerializer: (params: any) => any; export { RequestFile } from "../model"; -export declare const USER_AGENT = "OpenAPI-Generator/1.4-dev/node"; +export declare const USER_AGENT = "OpenAPI-Generator/1.5-dev/node"; export declare const generateFormData: (obj: any, typemap: AttributeTypeMap) => { localVarUseFormData: boolean; data: object; diff --git a/sdks/node/types/model/accountResponse.d.ts b/sdks/node/types/model/accountResponse.d.ts index 81e644702..c38fde985 100644 --- a/sdks/node/types/model/accountResponse.d.ts +++ b/sdks/node/types/model/accountResponse.d.ts @@ -1,5 +1,6 @@ import { AttributeTypeMap } from "./"; import { AccountResponseQuotas } from "./accountResponseQuotas"; +import { AccountResponseUsage } from "./accountResponseUsage"; export declare class AccountResponse { "accountId"?: string; "emailAddress"?: string; @@ -11,6 +12,7 @@ export declare class AccountResponse { "roleCode"?: string | null; "teamId"?: string | null; "locale"?: string | null; + "usage"?: AccountResponseUsage; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/accountResponseQuotas.d.ts b/sdks/node/types/model/accountResponseQuotas.d.ts index 13035a4c6..6bbcc52c6 100644 --- a/sdks/node/types/model/accountResponseQuotas.d.ts +++ b/sdks/node/types/model/accountResponseQuotas.d.ts @@ -5,6 +5,7 @@ export declare class AccountResponseQuotas { "templatesTotal"?: number | null; "templatesLeft"?: number | null; "smsVerificationsLeft"?: number | null; + "numFaxPagesLeft"?: number | null; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/accountResponseUsage.d.ts b/sdks/node/types/model/accountResponseUsage.d.ts new file mode 100644 index 000000000..7506ca0ee --- /dev/null +++ b/sdks/node/types/model/accountResponseUsage.d.ts @@ -0,0 +1,8 @@ +import { AttributeTypeMap } from "./"; +export declare class AccountResponseUsage { + "faxPagesSent"?: number | null; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): AccountResponseUsage; +} diff --git a/sdks/node/types/model/index.d.ts b/sdks/node/types/model/index.d.ts index 927a025c2..f748121c4 100644 --- a/sdks/node/types/model/index.d.ts +++ b/sdks/node/types/model/index.d.ts @@ -3,6 +3,7 @@ import { AccountCreateResponse } from "./accountCreateResponse"; import { AccountGetResponse } from "./accountGetResponse"; import { AccountResponse } from "./accountResponse"; import { AccountResponseQuotas } from "./accountResponseQuotas"; +import { AccountResponseUsage } from "./accountResponseUsage"; import { AccountUpdateRequest } from "./accountUpdateRequest"; import { AccountVerifyRequest } from "./accountVerifyRequest"; import { AccountVerifyResponse } from "./accountVerifyResponse"; @@ -177,4 +178,4 @@ export declare let enumsMap: { export declare let typeMap: { [index: string]: any; }; -export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FileResponse, FileResponseDataUri, ListInfoResponse, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ReportCreateRequest, ReportCreateResponse, ReportResponse, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateEditResponse, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, WarningResponse, EventCallbackHelper, RequestDetailedFile, RequestFile, AttributeTypeMap, ObjectSerializer, Authentication, HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, VoidAuth, Interceptor, }; +export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FileResponse, FileResponseDataUri, ListInfoResponse, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ReportCreateRequest, ReportCreateResponse, ReportResponse, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateEditResponse, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, WarningResponse, EventCallbackHelper, RequestDetailedFile, RequestFile, AttributeTypeMap, ObjectSerializer, Authentication, HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, VoidAuth, Interceptor, }; diff --git a/sdks/php/README.md b/sdks/php/README.md index 5c6470ef0..6dc14707d 100644 --- a/sdks/php/README.md +++ b/sdks/php/README.md @@ -212,6 +212,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [AccountGetResponse](docs/Model/AccountGetResponse.md) - [AccountResponse](docs/Model/AccountResponse.md) - [AccountResponseQuotas](docs/Model/AccountResponseQuotas.md) +- [AccountResponseUsage](docs/Model/AccountResponseUsage.md) - [AccountUpdateRequest](docs/Model/AccountUpdateRequest.md) - [AccountVerifyRequest](docs/Model/AccountVerifyRequest.md) - [AccountVerifyResponse](docs/Model/AccountVerifyResponse.md) @@ -408,5 +409,5 @@ apisupport@hellosign.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `3.0.0` - - Package version: `1.4-dev` + - Package version: `1.5-dev` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/sdks/php/VERSION b/sdks/php/VERSION index d918f457e..6f3dd2f48 100644 --- a/sdks/php/VERSION +++ b/sdks/php/VERSION @@ -1 +1 @@ -1.4-dev +1.5-dev diff --git a/sdks/php/docs/Model/AccountResponse.md b/sdks/php/docs/Model/AccountResponse.md index e371da6f4..3121826ba 100644 --- a/sdks/php/docs/Model/AccountResponse.md +++ b/sdks/php/docs/Model/AccountResponse.md @@ -16,5 +16,6 @@ Name | Type | Description | Notes | `role_code` | ```string``` | The membership role for the team. | | | `team_id` | ```string``` | The id of the team account belongs to. | | | `locale` | ```string``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | +| `usage` | [```\Dropbox\Sign\Model\AccountResponseUsage```](AccountResponseUsage.md) | | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/AccountResponseQuotas.md b/sdks/php/docs/Model/AccountResponseQuotas.md index 391c9fc7a..9490fa320 100644 --- a/sdks/php/docs/Model/AccountResponseQuotas.md +++ b/sdks/php/docs/Model/AccountResponseQuotas.md @@ -11,5 +11,6 @@ Name | Type | Description | Notes | `templates_total` | ```int``` | Total API templates allowed. | | | `templates_left` | ```int``` | API templates remaining. | | | `sms_verifications_left` | ```int``` | SMS verifications remaining. | | +| `num_fax_pages_left` | ```int``` | Number of fax pages left | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/AccountResponseUsage.md b/sdks/php/docs/Model/AccountResponseUsage.md new file mode 100644 index 000000000..3d8c992c2 --- /dev/null +++ b/sdks/php/docs/Model/AccountResponseUsage.md @@ -0,0 +1,11 @@ +# # AccountResponseUsage + +Details concerning monthly usage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `fax_pages_sent` | ```int``` | Number of fax pages sent | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/openapi-config.yaml b/sdks/php/openapi-config.yaml index 09ea41d90..d93266974 100644 --- a/sdks/php/openapi-config.yaml +++ b/sdks/php/openapi-config.yaml @@ -4,7 +4,7 @@ typeMappings: additionalProperties: packageName: dropbox/sign packageVersion: "^1.3.0" - artifactVersion: 1.4-dev + artifactVersion: 1.5-dev invokerPackage: "Dropbox\\Sign" sortModelPropertiesByRequiredFlag: true srcBasePath: src diff --git a/sdks/php/src/Configuration.php b/sdks/php/src/Configuration.php index bb9d0b287..584f4a2a2 100644 --- a/sdks/php/src/Configuration.php +++ b/sdks/php/src/Configuration.php @@ -70,7 +70,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/1.4-dev/PHP'; + protected $userAgent = 'OpenAPI-Generator/1.5-dev/PHP'; /** * Debug switch (default set to false) @@ -319,7 +319,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 3.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 1.4-dev' . PHP_EOL; + $report .= ' SDK Package Version: 1.5-dev' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/sdks/php/src/Model/AccountResponse.php b/sdks/php/src/Model/AccountResponse.php index f7078845a..e9089384d 100644 --- a/sdks/php/src/Model/AccountResponse.php +++ b/sdks/php/src/Model/AccountResponse.php @@ -71,6 +71,7 @@ class AccountResponse implements ModelInterface, ArrayAccess, JsonSerializable 'role_code' => 'string', 'team_id' => 'string', 'locale' => 'string', + 'usage' => '\Dropbox\Sign\Model\AccountResponseUsage', ]; /** @@ -91,6 +92,7 @@ class AccountResponse implements ModelInterface, ArrayAccess, JsonSerializable 'role_code' => null, 'team_id' => null, 'locale' => null, + 'usage' => null, ]; /** @@ -130,6 +132,7 @@ public static function openAPIFormats() 'role_code' => 'role_code', 'team_id' => 'team_id', 'locale' => 'locale', + 'usage' => 'usage', ]; /** @@ -148,6 +151,7 @@ public static function openAPIFormats() 'role_code' => 'setRoleCode', 'team_id' => 'setTeamId', 'locale' => 'setLocale', + 'usage' => 'setUsage', ]; /** @@ -166,6 +170,7 @@ public static function openAPIFormats() 'role_code' => 'getRoleCode', 'team_id' => 'getTeamId', 'locale' => 'getLocale', + 'usage' => 'getUsage', ]; /** @@ -234,6 +239,7 @@ public function __construct(array $data = null) $this->container['role_code'] = $data['role_code'] ?? null; $this->container['team_id'] = $data['team_id'] ?? null; $this->container['locale'] = $data['locale'] ?? null; + $this->container['usage'] = $data['usage'] ?? null; } /** @deprecated use ::init() */ @@ -517,6 +523,30 @@ public function setLocale(?string $locale) return $this; } + /** + * Gets usage + * + * @return AccountResponseUsage|null + */ + public function getUsage() + { + return $this->container['usage']; + } + + /** + * Sets usage + * + * @param AccountResponseUsage|null $usage usage + * + * @return self + */ + public function setUsage(?AccountResponseUsage $usage) + { + $this->container['usage'] = $usage; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/AccountResponseQuotas.php b/sdks/php/src/Model/AccountResponseQuotas.php index a5edc9017..cccd306d1 100644 --- a/sdks/php/src/Model/AccountResponseQuotas.php +++ b/sdks/php/src/Model/AccountResponseQuotas.php @@ -67,6 +67,7 @@ class AccountResponseQuotas implements ModelInterface, ArrayAccess, JsonSerializ 'templates_total' => 'int', 'templates_left' => 'int', 'sms_verifications_left' => 'int', + 'num_fax_pages_left' => 'int', ]; /** @@ -82,6 +83,7 @@ class AccountResponseQuotas implements ModelInterface, ArrayAccess, JsonSerializ 'templates_total' => null, 'templates_left' => null, 'sms_verifications_left' => null, + 'num_fax_pages_left' => null, ]; /** @@ -116,6 +118,7 @@ public static function openAPIFormats() 'templates_total' => 'templates_total', 'templates_left' => 'templates_left', 'sms_verifications_left' => 'sms_verifications_left', + 'num_fax_pages_left' => 'num_fax_pages_left', ]; /** @@ -129,6 +132,7 @@ public static function openAPIFormats() 'templates_total' => 'setTemplatesTotal', 'templates_left' => 'setTemplatesLeft', 'sms_verifications_left' => 'setSmsVerificationsLeft', + 'num_fax_pages_left' => 'setNumFaxPagesLeft', ]; /** @@ -142,6 +146,7 @@ public static function openAPIFormats() 'templates_total' => 'getTemplatesTotal', 'templates_left' => 'getTemplatesLeft', 'sms_verifications_left' => 'getSmsVerificationsLeft', + 'num_fax_pages_left' => 'getNumFaxPagesLeft', ]; /** @@ -205,6 +210,7 @@ public function __construct(array $data = null) $this->container['templates_total'] = $data['templates_total'] ?? null; $this->container['templates_left'] = $data['templates_left'] ?? null; $this->container['sms_verifications_left'] = $data['sms_verifications_left'] ?? null; + $this->container['num_fax_pages_left'] = $data['num_fax_pages_left'] ?? null; } /** @deprecated use ::init() */ @@ -368,6 +374,30 @@ public function setSmsVerificationsLeft(?int $sms_verifications_left) return $this; } + /** + * Gets num_fax_pages_left + * + * @return int|null + */ + public function getNumFaxPagesLeft() + { + return $this->container['num_fax_pages_left']; + } + + /** + * Sets num_fax_pages_left + * + * @param int|null $num_fax_pages_left Number of fax pages left + * + * @return self + */ + public function setNumFaxPagesLeft(?int $num_fax_pages_left) + { + $this->container['num_fax_pages_left'] = $num_fax_pages_left; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/AccountResponseUsage.php b/sdks/php/src/Model/AccountResponseUsage.php new file mode 100644 index 000000000..847becac0 --- /dev/null +++ b/sdks/php/src/Model/AccountResponseUsage.php @@ -0,0 +1,343 @@ + + * @template TKey int|null + * @template TValue mixed|null + * @internal This class should not be instantiated directly + */ +class AccountResponseUsage implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountResponseUsage'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fax_pages_sent' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fax_pages_sent' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fax_pages_sent' => 'fax_pages_sent', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fax_pages_sent' => 'setFaxPagesSent', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fax_pages_sent' => 'getFaxPagesSent', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['fax_pages_sent'] = $data['fax_pages_sent'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): AccountResponseUsage + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): AccountResponseUsage + { + /** @var AccountResponseUsage $obj */ + $obj = ObjectSerializer::deserialize( + $data, + AccountResponseUsage::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets fax_pages_sent + * + * @return int|null + */ + public function getFaxPagesSent() + { + return $this->container['fax_pages_sent']; + } + + /** + * Sets fax_pages_sent + * + * @param int|null $fax_pages_sent Number of fax pages sent + * + * @return self + */ + public function setFaxPagesSent(?int $fax_pages_sent) + { + $this->container['fax_pages_sent'] = $fax_pages_sent; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return scalar|object|array|null returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/sdks/php/templates/model.mustache b/sdks/php/templates/model.mustache index 2e38c1dd3..f0f5f1843 100644 --- a/sdks/php/templates/model.mustache +++ b/sdks/php/templates/model.mustache @@ -44,7 +44,7 @@ use ReturnTypeWillChange; * @template TKey int|null * @template TValue mixed|null {{/isEnum}} - * {{#vendorExtensions.x-internal}}@internal This class should not be instantiated directly{{/vendorExtensions.x-internal}} + * {{#vendorExtensions.x-internal-class}}@internal This class should not be instantiated directly{{/vendorExtensions.x-internal-class}} */ {{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}} {{/model}}{{/models}} diff --git a/sdks/python/.openapi-generator/FILES b/sdks/python/.openapi-generator/FILES index 6f128a682..22b647339 100644 --- a/sdks/python/.openapi-generator/FILES +++ b/sdks/python/.openapi-generator/FILES @@ -9,6 +9,7 @@ docs/AccountCreateResponse.md docs/AccountGetResponse.md docs/AccountResponse.md docs/AccountResponseQuotas.md +docs/AccountResponseUsage.md docs/AccountUpdateRequest.md docs/AccountVerifyRequest.md docs/AccountVerifyResponse.md @@ -207,6 +208,7 @@ dropbox_sign/model/account_create_response.py dropbox_sign/model/account_get_response.py dropbox_sign/model/account_response.py dropbox_sign/model/account_response_quotas.py +dropbox_sign/model/account_response_usage.py dropbox_sign/model/account_update_request.py dropbox_sign/model/account_verify_request.py dropbox_sign/model/account_verify_response.py diff --git a/sdks/python/README.md b/sdks/python/README.md index bff044948..b2233372c 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -50,7 +50,7 @@ Python >=3.7 Install using `pip`: ```shell -python3 -m pip install dropbox-sign==1.4-dev +python3 -m pip install dropbox-sign==1.5-dev ``` Alternatively: @@ -171,6 +171,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [AccountGetResponse](docs/AccountGetResponse.md) - [AccountResponse](docs/AccountResponse.md) - [AccountResponseQuotas](docs/AccountResponseQuotas.md) + - [AccountResponseUsage](docs/AccountResponseUsage.md) - [AccountUpdateRequest](docs/AccountUpdateRequest.md) - [AccountVerifyRequest](docs/AccountVerifyRequest.md) - [AccountVerifyResponse](docs/AccountVerifyResponse.md) @@ -362,6 +363,6 @@ apisupport@hellosign.com This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- Package version: 1.4-dev +- Package version: 1.5-dev - Build package: org.openapitools.codegen.languages.PythonClientCodegen diff --git a/sdks/python/VERSION b/sdks/python/VERSION index d918f457e..6f3dd2f48 100644 --- a/sdks/python/VERSION +++ b/sdks/python/VERSION @@ -1 +1 @@ -1.4-dev +1.5-dev diff --git a/sdks/python/docs/AccountResponse.md b/sdks/python/docs/AccountResponse.md index 0dc03f338..cf5552679 100644 --- a/sdks/python/docs/AccountResponse.md +++ b/sdks/python/docs/AccountResponse.md @@ -16,6 +16,7 @@ | `role_code` | ```str, none_type``` | The membership role for the team. | | | `team_id` | ```str, none_type``` | The id of the team account belongs to. | | | `locale` | ```str, none_type``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | +| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountResponseQuotas.md b/sdks/python/docs/AccountResponseQuotas.md index 61fb0ce74..bdf6974d4 100644 --- a/sdks/python/docs/AccountResponseQuotas.md +++ b/sdks/python/docs/AccountResponseQuotas.md @@ -11,6 +11,7 @@ Details concerning remaining monthly quotas. | `templates_total` | ```int, none_type``` | Total API templates allowed. | | | `templates_left` | ```int, none_type``` | API templates remaining. | | | `sms_verifications_left` | ```int, none_type``` | SMS verifications remaining. | | +| `num_fax_pages_left` | ```int, none_type``` | Number of fax pages left | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountResponseUsage.md b/sdks/python/docs/AccountResponseUsage.md new file mode 100644 index 000000000..e6e51d2bc --- /dev/null +++ b/sdks/python/docs/AccountResponseUsage.md @@ -0,0 +1,14 @@ +# AccountResponseUsage + +Details concerning monthly usage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_pages_sent` | ```int, none_type``` | Number of fax pages sent | | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index 493f616a4..ccc78f37b 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -11,7 +11,7 @@ """ -__version__ = "1.4-dev" +__version__ = "1.5-dev" # import ApiClient from dropbox_sign.api_client import ApiClient diff --git a/sdks/python/dropbox_sign/api_client.py b/sdks/python/dropbox_sign/api_client.py index cf74f2413..f162a0807 100644 --- a/sdks/python/dropbox_sign/api_client.py +++ b/sdks/python/dropbox_sign/api_client.py @@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.4-dev/python' + self.user_agent = 'OpenAPI-Generator/1.5-dev/python' def __enter__(self): return self diff --git a/sdks/python/dropbox_sign/configuration.py b/sdks/python/dropbox_sign/configuration.py index e2cebe06d..59af89232 100644 --- a/sdks/python/dropbox_sign/configuration.py +++ b/sdks/python/dropbox_sign/configuration.py @@ -413,7 +413,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 3.0.0\n"\ - "SDK Package Version: 1.4-dev".\ + "SDK Package Version: 1.5-dev".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/sdks/python/dropbox_sign/model/account_response.py b/sdks/python/dropbox_sign/model/account_response.py index 92d2e5ce2..3c35e6342 100644 --- a/sdks/python/dropbox_sign/model/account_response.py +++ b/sdks/python/dropbox_sign/model/account_response.py @@ -34,11 +34,14 @@ from dropbox_sign.exceptions import ApiAttributeError if TYPE_CHECKING: from dropbox_sign.model.account_response_quotas import AccountResponseQuotas + from dropbox_sign.model.account_response_usage import AccountResponseUsage def lazy_import(): from dropbox_sign.model.account_response_quotas import AccountResponseQuotas + from dropbox_sign.model.account_response_usage import AccountResponseUsage globals()['AccountResponseQuotas'] = AccountResponseQuotas + globals()['AccountResponseUsage'] = AccountResponseUsage class AccountResponse(ModelNormal): @@ -104,6 +107,7 @@ def openapi_types(): 'role_code': (str, none_type,), # noqa: E501 'team_id': (str, none_type,), # noqa: E501 'locale': (str, none_type,), # noqa: E501 + 'usage': (AccountResponseUsage,), # noqa: E501 } @cached_property @@ -137,6 +141,7 @@ def init(data: any) -> AccountResponse: 'role_code': 'role_code', # noqa: E501 'team_id': 'team_id', # noqa: E501 'locale': 'locale', # noqa: E501 + 'usage': 'usage', # noqa: E501 } read_only_vars = { @@ -224,6 +229,14 @@ def locale(self) -> Optional[str]: def locale(self, value: Optional[str]): setattr(self, "locale", value) + @property + def usage(self) -> AccountResponseUsage: + return self.get("usage") + + @usage.setter + def usage(self, value: AccountResponseUsage): + setattr(self, "usage", value) + @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @@ -270,6 +283,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 role_code (str, none_type): The membership role for the team.. [optional] # noqa: E501 team_id (str, none_type): The id of the team account belongs to.. [optional] # noqa: E501 locale (str, none_type): The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.. [optional] # noqa: E501 + usage (AccountResponseUsage): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -361,6 +375,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 role_code (str, none_type): The membership role for the team.. [optional] # noqa: E501 team_id (str, none_type): The id of the team account belongs to.. [optional] # noqa: E501 locale (str, none_type): The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.. [optional] # noqa: E501 + usage (AccountResponseUsage): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/sdks/python/dropbox_sign/model/account_response_quotas.py b/sdks/python/dropbox_sign/model/account_response_quotas.py index 1eccd282b..a38ffcc40 100644 --- a/sdks/python/dropbox_sign/model/account_response_quotas.py +++ b/sdks/python/dropbox_sign/model/account_response_quotas.py @@ -91,6 +91,7 @@ def openapi_types(): 'templates_total': (int, none_type,), # noqa: E501 'templates_left': (int, none_type,), # noqa: E501 'sms_verifications_left': (int, none_type,), # noqa: E501 + 'num_fax_pages_left': (int, none_type,), # noqa: E501 } @cached_property @@ -119,6 +120,7 @@ def init(data: any) -> AccountResponseQuotas: 'templates_total': 'templates_total', # noqa: E501 'templates_left': 'templates_left', # noqa: E501 'sms_verifications_left': 'sms_verifications_left', # noqa: E501 + 'num_fax_pages_left': 'num_fax_pages_left', # noqa: E501 } read_only_vars = { @@ -166,6 +168,14 @@ def sms_verifications_left(self) -> Optional[int]: def sms_verifications_left(self, value: Optional[int]): setattr(self, "sms_verifications_left", value) + @property + def num_fax_pages_left(self) -> Optional[int]: + return self.get("num_fax_pages_left") + + @num_fax_pages_left.setter + def num_fax_pages_left(self, value: Optional[int]): + setattr(self, "num_fax_pages_left", value) + @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @@ -207,6 +217,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 templates_total (int, none_type): Total API templates allowed.. [optional] # noqa: E501 templates_left (int, none_type): API templates remaining.. [optional] # noqa: E501 sms_verifications_left (int, none_type): SMS verifications remaining.. [optional] # noqa: E501 + num_fax_pages_left (int, none_type): Number of fax pages left. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -293,6 +304,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 templates_total (int, none_type): Total API templates allowed.. [optional] # noqa: E501 templates_left (int, none_type): API templates remaining.. [optional] # noqa: E501 sms_verifications_left (int, none_type): SMS verifications remaining.. [optional] # noqa: E501 + num_fax_pages_left (int, none_type): Number of fax pages left. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/sdks/python/dropbox_sign/model/account_response_usage.py b/sdks/python/dropbox_sign/model/account_response_usage.py new file mode 100644 index 000000000..8bdf363ee --- /dev/null +++ b/sdks/python/dropbox_sign/model/account_response_usage.py @@ -0,0 +1,283 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError + + + +class AccountResponseUsage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'fax_pages_sent': (int, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> AccountResponseUsage: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[AccountResponseUsage], + _check_type=True, + ) + + attribute_map = { + 'fax_pages_sent': 'fax_pages_sent', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def fax_pages_sent(self) -> Optional[int]: + return self.get("fax_pages_sent") + + @fax_pages_sent.setter + def fax_pages_sent(self, value: Optional[int]): + setattr(self, "fax_pages_sent", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AccountResponseUsage - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + fax_pages_sent (int, none_type): Number of fax pages sent. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AccountResponseUsage - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + fax_pages_sent (int, none_type): Number of fax pages sent. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index cc37e87f7..81a97b084 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -14,6 +14,7 @@ from dropbox_sign.model.account_get_response import AccountGetResponse from dropbox_sign.model.account_response import AccountResponse from dropbox_sign.model.account_response_quotas import AccountResponseQuotas +from dropbox_sign.model.account_response_usage import AccountResponseUsage from dropbox_sign.model.account_update_request import AccountUpdateRequest from dropbox_sign.model.account_verify_request import AccountVerifyRequest from dropbox_sign.model.account_verify_response import AccountVerifyResponse diff --git a/sdks/python/openapi-config.yaml b/sdks/python/openapi-config.yaml index f6111cfd4..43c6d710c 100644 --- a/sdks/python/openapi-config.yaml +++ b/sdks/python/openapi-config.yaml @@ -4,7 +4,7 @@ additionalProperties: generatorLanguageVersion: ">=3.7" packageName: dropbox_sign projectName: dropbox-sign - packageVersion: 1.4-dev + packageVersion: 1.5-dev sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true packageAuthor: Dropbox Sign API Team diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 03886d7ef..aab74260f 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -13,7 +13,7 @@ from pathlib import Path NAME = "dropbox-sign" -VERSION = "1.4-dev" +VERSION = "1.5-dev" # To install the library, run the following # # python setup.py install diff --git a/sdks/ruby/.gitlab-ci.yml b/sdks/ruby/.gitlab-ci.yml new file mode 100644 index 000000000..3a253c45c --- /dev/null +++ b/sdks/ruby/.gitlab-ci.yml @@ -0,0 +1,26 @@ +.ruby: &ruby + variables: + LANG: "C.UTF-8" + before_script: + - ruby -v + - bundle config set --local deployment true + - bundle install -j $(nproc) + parallel: + matrix: + - RUBY_VERSION: ['2.7', '3.0', '3.1'] + image: "ruby:$RUBY_VERSION" + cache: + paths: + - vendor/ruby + key: 'ruby-$RUBY_VERSION' + +gem: + extends: .ruby + script: + - bundle exec rspec + - bundle exec rake build + - bundle exec rake install + artifacts: + paths: + - pkg/*.gem + diff --git a/sdks/ruby/.openapi-generator/FILES b/sdks/ruby/.openapi-generator/FILES index 7439cee03..f02adf49e 100644 --- a/sdks/ruby/.openapi-generator/FILES +++ b/sdks/ruby/.openapi-generator/FILES @@ -1,4 +1,5 @@ .gitignore +.gitlab-ci.yml .rspec .rubocop.yml .travis.yml @@ -12,6 +13,7 @@ docs/AccountCreateResponse.md docs/AccountGetResponse.md docs/AccountResponse.md docs/AccountResponseQuotas.md +docs/AccountResponseUsage.md docs/AccountUpdateRequest.md docs/AccountVerifyRequest.md docs/AccountVerifyResponse.md @@ -208,6 +210,7 @@ lib/dropbox-sign/models/account_create_response.rb lib/dropbox-sign/models/account_get_response.rb lib/dropbox-sign/models/account_response.rb lib/dropbox-sign/models/account_response_quotas.rb +lib/dropbox-sign/models/account_response_usage.rb lib/dropbox-sign/models/account_update_request.rb lib/dropbox-sign/models/account_verify_request.rb lib/dropbox-sign/models/account_verify_response.rb @@ -375,6 +378,4 @@ lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb lib/dropbox-sign/models/unclaimed_draft_response.rb lib/dropbox-sign/models/warning_response.rb lib/dropbox-sign/version.rb -spec/api_client_spec.rb -spec/configuration_spec.rb spec/spec_helper.rb diff --git a/sdks/ruby/.openapi-generator/VERSION b/sdks/ruby/.openapi-generator/VERSION index e230c8396..1985849fb 100644 --- a/sdks/ruby/.openapi-generator/VERSION +++ b/sdks/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0 \ No newline at end of file +7.7.0 diff --git a/sdks/ruby/.travis.yml b/sdks/ruby/.travis.yml index c5a22b8bc..5d149dd89 100644 --- a/sdks/ruby/.travis.yml +++ b/sdks/ruby/.travis.yml @@ -1,14 +1,11 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec - gem build dropbox-sign.gemspec - - gem install ./dropbox-sign-1.4-dev.gem + - gem install ./dropbox-sign-1.5-dev.gem diff --git a/sdks/ruby/Gemfile.lock b/sdks/ruby/Gemfile.lock index ce609dd26..8fb3191e0 100644 --- a/sdks/ruby/Gemfile.lock +++ b/sdks/ruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dropbox-sign (1.4.pre.dev) + dropbox-sign (1.5.pre.dev) typhoeus (~> 1.0, >= 1.0.1) GEM @@ -10,45 +10,47 @@ GEM ast (2.4.2) byebug (11.1.3) coderay (1.1.3) - diff-lcs (1.5.0) + diff-lcs (1.5.1) ethon (0.16.0) ffi (>= 1.15.0) ffi (1.17.0-aarch64-linux-gnu) ffi (1.17.0-arm64-darwin) ffi (1.17.0-x86_64-darwin) ffi (1.17.0-x86_64-linux-gnu) - jaro_winkler (1.5.4) + jaro_winkler (1.5.6) json_spec (1.1.5) multi_json (~> 1.0) rspec (>= 2.0, < 4.0) - method_source (1.0.0) + method_source (1.1.0) multi_json (1.15.0) - parallel (1.21.0) - parser (3.1.0.0) + parallel (1.26.3) + parser (3.3.4.2) ast (~> 2.4.1) - pry (0.13.1) + racc + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.13.0) - psych (4.0.3) + pry (>= 0.13, < 0.15) + psych (5.1.2) stringio + racc (1.8.1) rainbow (3.1.1) rake (13.0.6) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-mocks (3.11.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-support (3.11.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) rubocop (0.66.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) @@ -57,8 +59,8 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.6) - ruby-progressbar (1.11.0) - stringio (3.0.1) + ruby-progressbar (1.13.0) + stringio (3.1.1) typhoeus (1.4.1) ethon (>= 0.9.0) unicode-display_width (1.5.0) @@ -79,4 +81,4 @@ DEPENDENCIES rubocop (~> 0.66.0) BUNDLED WITH - 2.3.5 + 2.3.26 diff --git a/sdks/ruby/README.md b/sdks/ruby/README.md index be38ec5bc..784af10dc 100644 --- a/sdks/ruby/README.md +++ b/sdks/ruby/README.md @@ -25,7 +25,8 @@ directory that corresponds to the file you want updated. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- Package version: 1.4-dev +- Package version: 1.5-dev +- Generator version: 7.7.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen ## Installation @@ -46,14 +47,14 @@ gem build dropbox-sign.gemspec Then install the gem locally: ```shell -gem install ./dropbox-sign-1.4-dev.gem +gem install ./dropbox-sign-1.5-dev.gem ``` -(for development, run `gem install --dev ./dropbox-sign-1.4-dev.gem` to install the development dependencies) +(for development, run `gem install --dev ./dropbox-sign-1.5-dev.gem` to install the development dependencies) Finally add this to the Gemfile: - gem 'dropbox-sign', '~> 1.4-dev' + gem 'dropbox-sign', '~> 1.5-dev' ### Install from Git @@ -172,6 +173,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::AccountGetResponse](docs/AccountGetResponse.md) - [Dropbox::Sign::AccountResponse](docs/AccountResponse.md) - [Dropbox::Sign::AccountResponseQuotas](docs/AccountResponseQuotas.md) + - [Dropbox::Sign::AccountResponseUsage](docs/AccountResponseUsage.md) - [Dropbox::Sign::AccountUpdateRequest](docs/AccountUpdateRequest.md) - [Dropbox::Sign::AccountVerifyRequest](docs/AccountVerifyRequest.md) - [Dropbox::Sign::AccountVerifyResponse](docs/AccountVerifyResponse.md) diff --git a/sdks/ruby/VERSION b/sdks/ruby/VERSION index d918f457e..6f3dd2f48 100644 --- a/sdks/ruby/VERSION +++ b/sdks/ruby/VERSION @@ -1 +1 @@ -1.4-dev +1.5-dev diff --git a/sdks/ruby/docs/AccountResponse.md b/sdks/ruby/docs/AccountResponse.md index 07d959b1e..294f29431 100644 --- a/sdks/ruby/docs/AccountResponse.md +++ b/sdks/ruby/docs/AccountResponse.md @@ -16,4 +16,5 @@ | `role_code` | ```String``` | The membership role for the team. | | | `team_id` | ```String``` | The id of the team account belongs to. | | | `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | +| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | diff --git a/sdks/ruby/docs/AccountResponseQuotas.md b/sdks/ruby/docs/AccountResponseQuotas.md index 163aabe95..2a6b0c98a 100644 --- a/sdks/ruby/docs/AccountResponseQuotas.md +++ b/sdks/ruby/docs/AccountResponseQuotas.md @@ -11,4 +11,5 @@ Details concerning remaining monthly quotas. | `templates_total` | ```Integer``` | Total API templates allowed. | | | `templates_left` | ```Integer``` | API templates remaining. | | | `sms_verifications_left` | ```Integer``` | SMS verifications remaining. | | +| `num_fax_pages_left` | ```Integer``` | Number of fax pages left | | diff --git a/sdks/ruby/docs/AccountResponseUsage.md b/sdks/ruby/docs/AccountResponseUsage.md new file mode 100644 index 000000000..6dc2ddc21 --- /dev/null +++ b/sdks/ruby/docs/AccountResponseUsage.md @@ -0,0 +1,10 @@ +# Dropbox::Sign::AccountResponseUsage + +Details concerning monthly usage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_pages_sent` | ```Integer``` | Number of fax pages sent | | + diff --git a/sdks/ruby/dropbox-sign.gemspec b/sdks/ruby/dropbox-sign.gemspec index 031f2cbed..b0b43f3e1 100755 --- a/sdks/ruby/dropbox-sign.gemspec +++ b/sdks/ruby/dropbox-sign.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -26,6 +26,7 @@ Gem::Specification.new do |s| s.description = "Official Dropbox Sign APIv3 OpenAPI Ruby SDK" s.license = "MIT" s.required_ruby_version = ">= 2.7" + s.metadata = {} s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' diff --git a/sdks/ruby/lib/dropbox-sign.rb b/sdks/ruby/lib/dropbox-sign.rb index 1e3f0728d..9e790e34b 100644 --- a/sdks/ruby/lib/dropbox-sign.rb +++ b/sdks/ruby/lib/dropbox-sign.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -22,6 +22,7 @@ require 'dropbox-sign/models/account_get_response' require 'dropbox-sign/models/account_response' require 'dropbox-sign/models/account_response_quotas' +require 'dropbox-sign/models/account_response_usage' require 'dropbox-sign/models/account_update_request' require 'dropbox-sign/models/account_verify_request' require 'dropbox-sign/models/account_verify_response' diff --git a/sdks/ruby/lib/dropbox-sign/api/account_api.rb b/sdks/ruby/lib/dropbox-sign/api/account_api.rb index 5d18d4dd2..1a8236db0 100644 --- a/sdks/ruby/lib/dropbox-sign/api/account_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/account_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/api_app_api.rb b/sdks/ruby/lib/dropbox-sign/api/api_app_api.rb index 2f57b33fc..809c7e834 100644 --- a/sdks/ruby/lib/dropbox-sign/api/api_app_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/api_app_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -306,8 +306,8 @@ def api_app_list(opts = {}) # List API Apps # Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the API App List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the API App List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @return [Array<(ApiAppListResponse, Integer, Hash)>] ApiAppListResponse data, response status code and response headers def api_app_list_with_http_info(opts = {}) if @api_client.config.debugging diff --git a/sdks/ruby/lib/dropbox-sign/api/bulk_send_job_api.rb b/sdks/ruby/lib/dropbox-sign/api/bulk_send_job_api.rb index 3184892f6..199add7c4 100644 --- a/sdks/ruby/lib/dropbox-sign/api/bulk_send_job_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/bulk_send_job_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -38,8 +38,8 @@ def bulk_send_job_get(bulk_send_job_id, opts = {}) # Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. # @param bulk_send_job_id [String] The id of the BulkSendJob to retrieve. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the BulkSendJob list to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + # @option opts [Integer] :page Which page number of the BulkSendJob list to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (default to 20) # @return [Array<(BulkSendJobGetResponse, Integer, Hash)>] BulkSendJobGetResponse data, response status code and response headers def bulk_send_job_get_with_http_info(bulk_send_job_id, opts = {}) if @api_client.config.debugging @@ -136,8 +136,8 @@ def bulk_send_job_list(opts = {}) # List Bulk Send Jobs # Returns a list of BulkSendJob that you can access. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the BulkSendJob List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + # @option opts [Integer] :page Which page number of the BulkSendJob List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (default to 20) # @return [Array<(BulkSendJobListResponse, Integer, Hash)>] BulkSendJobListResponse data, response status code and response headers def bulk_send_job_list_with_http_info(opts = {}) if @api_client.config.debugging diff --git a/sdks/ruby/lib/dropbox-sign/api/embedded_api.rb b/sdks/ruby/lib/dropbox-sign/api/embedded_api.rb index 2eeb3fcc2..0d153aed8 100644 --- a/sdks/ruby/lib/dropbox-sign/api/embedded_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/embedded_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb b/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb index 34f3fbbe7..03926e1fb 100644 --- a/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/report_api.rb b/sdks/ruby/lib/dropbox-sign/api/report_api.rb index 1c7365570..b545d5c16 100644 --- a/sdks/ruby/lib/dropbox-sign/api/report_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/report_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb b/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb index bcfb514da..48026cd2d 100644 --- a/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -540,7 +540,7 @@ def signature_request_files(signature_request_id, opts = {}) # Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. # @param signature_request_id [String] The id of the SignatureRequest to retrieve. # @param [Hash] opts the optional parameters - # @option opts [String] :file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + # @option opts [String] :file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (default to 'pdf') # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers def signature_request_files_with_http_info(signature_request_id, opts = {}) if @api_client.config.debugging @@ -735,7 +735,7 @@ def signature_request_files_as_file_url(signature_request_id, opts = {}) # Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. # @param signature_request_id [String] The id of the SignatureRequest to retrieve. # @param [Hash] opts the optional parameters - # @option opts [Integer] :force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. + # @option opts [Integer] :force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (default to 1) # @return [Array<(FileResponse, Integer, Hash)>] FileResponse data, response status code and response headers def signature_request_files_as_file_url_with_http_info(signature_request_id, opts = {}) if @api_client.config.debugging @@ -928,8 +928,8 @@ def signature_request_list(opts = {}) # Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. # @param [Hash] opts the optional parameters # @option opts [String] :account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. - # @option opts [Integer] :page Which page number of the SignatureRequest List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the SignatureRequest List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @option opts [String] :query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. # @return [Array<(SignatureRequestListResponse, Integer, Hash)>] SignatureRequestListResponse data, response status code and response headers def signature_request_list_with_http_info(opts = {}) diff --git a/sdks/ruby/lib/dropbox-sign/api/team_api.rb b/sdks/ruby/lib/dropbox-sign/api/team_api.rb index a2ababa66..a5de16415 100644 --- a/sdks/ruby/lib/dropbox-sign/api/team_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/team_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -590,8 +590,8 @@ def team_members(team_id, opts = {}) # Provides a paginated list of members (and their roles) that belong to a given team. # @param team_id [String] The id of the team that a member list is being requested from. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the team member list to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the team member list to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @return [Array<(TeamMembersResponse, Integer, Hash)>] TeamMembersResponse data, response status code and response headers def team_members_with_http_info(team_id, opts = {}) if @api_client.config.debugging @@ -807,8 +807,8 @@ def team_sub_teams(team_id, opts = {}) # Provides a paginated list of sub teams that belong to a given team. # @param team_id [String] The id of the parent Team. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the SubTeam List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the SubTeam List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @return [Array<(TeamSubTeamsResponse, Integer, Hash)>] TeamSubTeamsResponse data, response status code and response headers def team_sub_teams_with_http_info(team_id, opts = {}) if @api_client.config.debugging diff --git a/sdks/ruby/lib/dropbox-sign/api/template_api.rb b/sdks/ruby/lib/dropbox-sign/api/template_api.rb index e3f5852cf..c764bfd5f 100644 --- a/sdks/ruby/lib/dropbox-sign/api/template_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/template_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -632,7 +632,7 @@ def template_files_as_file_url(template_id, opts = {}) # Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. # @param template_id [String] The id of the template files to retrieve. # @param [Hash] opts the optional parameters - # @option opts [Integer] :force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. + # @option opts [Integer] :force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (default to 1) # @return [Array<(FileResponse, Integer, Hash)>] FileResponse data, response status code and response headers def template_files_as_file_url_with_http_info(template_id, opts = {}) if @api_client.config.debugging @@ -825,8 +825,8 @@ def template_list(opts = {}) # Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. # @param [Hash] opts the optional parameters # @option opts [String] :account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. - # @option opts [Integer] :page Which page number of the Template List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the Template List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @option opts [String] :query String that includes search terms and/or fields to be used to filter the Template objects. # @return [Array<(TemplateListResponse, Integer, Hash)>] TemplateListResponse data, response status code and response headers def template_list_with_http_info(opts = {}) diff --git a/sdks/ruby/lib/dropbox-sign/api/unclaimed_draft_api.rb b/sdks/ruby/lib/dropbox-sign/api/unclaimed_draft_api.rb index 56065a6a0..b45e740ae 100644 --- a/sdks/ruby/lib/dropbox-sign/api/unclaimed_draft_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/unclaimed_draft_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api_client.rb b/sdks/ruby/lib/dropbox-sign/api_client.rb index bfbf3f1a2..598c81784 100644 --- a/sdks/ruby/lib/dropbox-sign/api_client.rb +++ b/sdks/ruby/lib/dropbox-sign/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -48,9 +48,10 @@ def self.default # Call an API with given options. # # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: - # the data deserialized from response body (could be nil), response status code and response headers. + # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers. def call_api(http_method, path, opts = {}) request = build_request(http_method, path, opts) + tempfile = download_file(request) if opts[:return_type] == 'File' response = request.run if @config.debugging @@ -72,7 +73,9 @@ def call_api(http_method, path, opts = {}) end end - if opts[:return_type] + if opts[:return_type] == 'File' + data = tempfile + elsif opts[:return_type] data = deserialize(response, opts[:return_type]) else data = nil @@ -96,6 +99,7 @@ def build_request(http_method, path, opts = {}) header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true update_params_for_auth! header_params, query_params, opts[:auth_names] @@ -112,7 +116,8 @@ def build_request(http_method, path, opts = {}) :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided @@ -126,9 +131,7 @@ def build_request(http_method, path, opts = {}) end end - request = Typhoeus::Request.new(url, req_opts) - download_file(request) if opts[:return_type] == 'File' - request + Typhoeus::Request.new(url, req_opts) end # Builds the HTTP request body @@ -166,6 +169,8 @@ def build_request_body(header_params, form_params, body) # process can use. # # @see Configuration#temp_folder_path + # + # @return [Tempfile] the tempfile generated def download_file(request) tempfile = nil encoding = nil @@ -180,21 +185,24 @@ def download_file(request) prefix = prefix + '-' unless prefix.end_with?('-') encoding = response.body.encoding tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile = tempfile end request.on_body do |chunk| chunk.force_encoding(encoding) tempfile.write(chunk) end - request.on_complete do |response| - if tempfile - tempfile.close - @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - end + # run the request to ensure the tempfile is created successfully before returning it + request.run + if tempfile + tempfile.close + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + else + fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}") end + + tempfile end # Check if the given MIME is a JSON MIME. @@ -206,7 +214,7 @@ def download_file(request) # @param [String] mime MIME # @return [Boolean] True if the MIME is application/json def json_mime?(mime) - (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? + (mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil? end # Deserialize the response to the given return type. @@ -215,15 +223,10 @@ def json_mime?(mime) # @param [String] return_type some examples: "User", "Array", "Hash" def deserialize(response, return_type) body = response.body - - # handle file downloading - return the File instance processed in request callbacks - # note that response body is empty when the file is written in chunks in request on_body callback - return @tempfile if return_type == 'File' - return nil if body.nil? || body.empty? # return response body directly for String return type - return body if return_type == 'String' + return body.to_s if return_type == 'String' # ensuring a default content type content_type = response.headers['Content-Type'] || 'application/json' @@ -290,7 +293,7 @@ def convert_to_type(data, return_type) # @param [String] filename the filename to be sanitized # @return [String] the sanitized filename def sanitize_filename(filename) - filename.gsub(/.*[\/\\]/, '') + filename.split(/[\/\\]/).last end def build_request_url(path, opts = {}) diff --git a/sdks/ruby/lib/dropbox-sign/api_error.rb b/sdks/ruby/lib/dropbox-sign/api_error.rb index 50659ba8c..b914641c7 100644 --- a/sdks/ruby/lib/dropbox-sign/api_error.rb +++ b/sdks/ruby/lib/dropbox-sign/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -35,6 +35,7 @@ def initialize(arg = nil) end else super arg + @message = arg end end diff --git a/sdks/ruby/lib/dropbox-sign/configuration.rb b/sdks/ruby/lib/dropbox-sign/configuration.rb index 497e1c3bd..3fb654f70 100644 --- a/sdks/ruby/lib/dropbox-sign/configuration.rb +++ b/sdks/ruby/lib/dropbox-sign/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -65,6 +65,16 @@ class Configuration # Defines the access token (Bearer) used with OAuth2. attr_accessor :access_token + # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2. + # Overrides the access_token if set + # @return [Proc] + attr_accessor :access_token_getter + + # Set this to return data as binary instead of downloading a temp file. When enabled (set to true) + # HTTP responses with return type `File` will be returned as a stream of binary data. + # Default to false. + attr_accessor :return_binary_data + # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response # details will be logged with `logger.debug` (see the `logger` attribute). # Default to false. @@ -72,6 +82,14 @@ class Configuration # @return [true, false] attr_accessor :debugging + # Set this to ignore operation servers for the API client. This is useful when you need to + # send requests to a different server than the one specified in the OpenAPI document. + # Will default to the base url defined in the spec but can be overridden by setting + # `scheme`, `host`, `base_path` directly. + # Default to false. + # @return [true, false] + attr_accessor :ignore_operation_servers + # Defines the logger used for debugging. # Default to `Rails.logger` (when in Rails) or logging to STDOUT. # @@ -136,6 +154,7 @@ class Configuration # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 attr_accessor :params_encoding + attr_accessor :inject_format attr_accessor :force_ending_format @@ -144,7 +163,7 @@ def initialize @scheme = 'https' @host = 'api.hellosign.com' @base_path = '/v3' - @server_index = 0 + @server_index = nil @server_operation_index = {} @server_variables = {} @server_operation_variables = {} @@ -153,11 +172,12 @@ def initialize @client_side_validation = true @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 + @params_encoding = nil @debugging = false + @ignore_operation_servers = false @inject_format = false @force_ending_format = false @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) @@ -192,10 +212,13 @@ def base_path=(base_path) # Returns base URL for specified operation based on server settings def base_url(operation = nil) - index = server_operation_index.fetch(operation, server_index) - return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil - - server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers + if operation_server_settings.key?(operation) then + index = server_operation_index.fetch(operation, server_index) + server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + else + server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil) + end end # Gets API key (with prefix if set). @@ -210,6 +233,12 @@ def api_key_with_prefix(param_name, param_alias = nil) end end + # Gets access_token using access_token_getter or uses the static access_token + def access_token_with_refresh + return access_token if access_token_getter.nil? + access_token_getter.call + end + # Gets Basic Auth token string def basic_auth_token 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") @@ -273,8 +302,8 @@ def server_url(index, variables = {}, servers = nil) servers = server_settings if servers == nil # check array index out of bound - if (index < 0 || index >= servers.size) - fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" + if (index.nil? || index < 0 || index >= servers.size) + fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}" end server = servers[index] @@ -299,5 +328,6 @@ def server_url(index, variables = {}, servers = nil) url end + end end diff --git a/sdks/ruby/lib/dropbox-sign/event_callback_helper.rb b/sdks/ruby/lib/dropbox-sign/event_callback_helper.rb index eabea4cd1..57a3b3605 100644 --- a/sdks/ruby/lib/dropbox-sign/event_callback_helper.rb +++ b/sdks/ruby/lib/dropbox-sign/event_callback_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/account_create_request.rb index 58108bc54..ec9e2fa0e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -214,8 +214,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -233,7 +231,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_create_response.rb b/sdks/ruby/lib/dropbox-sign/models/account_create_response.rb index 278df40e6..4a256322e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_create_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -198,8 +198,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -217,7 +215,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/account_get_response.rb index c8ad1044a..9dab132d8 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_response.rb b/sdks/ruby/lib/dropbox-sign/models/account_response.rb index 3bde6db69..dfef0e17c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -57,6 +57,9 @@ class AccountResponse # @return [String, nil] attr_accessor :locale + # @return [AccountResponseUsage] + attr_accessor :usage + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -69,7 +72,8 @@ def self.attribute_map :'callback_url' => :'callback_url', :'role_code' => :'role_code', :'team_id' => :'team_id', - :'locale' => :'locale' + :'locale' => :'locale', + :'usage' => :'usage' } end @@ -95,7 +99,8 @@ def self.openapi_types :'callback_url' => :'String', :'role_code' => :'String', :'team_id' => :'String', - :'locale' => :'String' + :'locale' => :'String', + :'usage' => :'AccountResponseUsage' } end @@ -110,7 +115,7 @@ def self.openapi_nullable :'callback_url', :'role_code', :'team_id', - :'locale' + :'locale', ]) end @@ -183,6 +188,10 @@ def initialize(attributes = {}) if attributes.key?(:'locale') self.locale = attributes[:'locale'] end + + if attributes.key?(:'usage') + self.usage = attributes[:'usage'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -212,7 +221,8 @@ def ==(o) callback_url == o.callback_url && role_code == o.role_code && team_id == o.team_id && - locale == o.locale + locale == o.locale && + usage == o.usage end # @see the `==` method @@ -224,7 +234,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_id, email_address, is_locked, is_paid_hs, is_paid_hf, quotas, callback_url, role_code, team_id, locale].hash + [account_id, email_address, is_locked, is_paid_hs, is_paid_hf, quotas, callback_url, role_code, team_id, locale, usage].hash end # Builds the object from hash @@ -278,8 +288,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -297,7 +305,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb b/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb index 8ed7445d6..e2b9731a7 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -39,6 +39,10 @@ class AccountResponseQuotas # @return [Integer, nil] attr_accessor :sms_verifications_left + # Number of fax pages left + # @return [Integer, nil] + attr_accessor :num_fax_pages_left + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -46,7 +50,8 @@ def self.attribute_map :'documents_left' => :'documents_left', :'templates_total' => :'templates_total', :'templates_left' => :'templates_left', - :'sms_verifications_left' => :'sms_verifications_left' + :'sms_verifications_left' => :'sms_verifications_left', + :'num_fax_pages_left' => :'num_fax_pages_left' } end @@ -67,7 +72,8 @@ def self.openapi_types :'documents_left' => :'Integer', :'templates_total' => :'Integer', :'templates_left' => :'Integer', - :'sms_verifications_left' => :'Integer' + :'sms_verifications_left' => :'Integer', + :'num_fax_pages_left' => :'Integer' } end @@ -83,7 +89,8 @@ def self.openapi_nullable :'documents_left', :'templates_total', :'templates_left', - :'sms_verifications_left' + :'sms_verifications_left', + :'num_fax_pages_left' ]) end @@ -136,6 +143,10 @@ def initialize(attributes = {}) if attributes.key?(:'sms_verifications_left') self.sms_verifications_left = attributes[:'sms_verifications_left'] end + + if attributes.key?(:'num_fax_pages_left') + self.num_fax_pages_left = attributes[:'num_fax_pages_left'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -160,7 +171,8 @@ def ==(o) documents_left == o.documents_left && templates_total == o.templates_total && templates_left == o.templates_left && - sms_verifications_left == o.sms_verifications_left + sms_verifications_left == o.sms_verifications_left && + num_fax_pages_left == o.num_fax_pages_left end # @see the `==` method @@ -172,7 +184,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [api_signature_requests_left, documents_left, templates_total, templates_left, sms_verifications_left].hash + [api_signature_requests_left, documents_left, templates_total, templates_left, sms_verifications_left, num_fax_pages_left].hash end # Builds the object from hash @@ -226,8 +238,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -245,7 +255,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_response_usage.rb b/sdks/ruby/lib/dropbox-sign/models/account_response_usage.rb new file mode 100644 index 000000000..ee53f33a9 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/account_response_usage.rb @@ -0,0 +1,251 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + # Details concerning monthly usage + class AccountResponseUsage + # Number of fax pages sent + # @return [Integer, nil] + attr_accessor :fax_pages_sent + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fax_pages_sent' => :'fax_pages_sent' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'fax_pages_sent' => :'Integer' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'fax_pages_sent' + ]) + end + + # Returns list of attributes with nullable: true of this model + parent + def self.merged_nullable + self.openapi_nullable + end + + # Attempt to instantiate and hydrate a new instance of this class + # @param [Object] data Data to be converted + # @return [AccountResponseUsage] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "AccountResponseUsage" + ) || AccountResponseUsage.new + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::AccountResponseUsage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountResponseUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fax_pages_sent') + self.fax_pages_sent = attributes[:'fax_pages_sent'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fax_pages_sent == o.fax_pages_sent + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fax_pages_sent].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/account_update_request.rb index 0a2974148..e493e7d31 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_update_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -199,8 +199,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -218,7 +216,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_verify_request.rb b/sdks/ruby/lib/dropbox-sign/models/account_verify_request.rb index 4ed50d814..ecc203b72 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_verify_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_verify_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -181,8 +181,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -200,7 +198,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_verify_response.rb b/sdks/ruby/lib/dropbox-sign/models/account_verify_response.rb index 6a6b9ab11..fec9993f4 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_verify_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_verify_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_verify_response_account.rb b/sdks/ruby/lib/dropbox-sign/models/account_verify_response_account.rb index 81acb94f3..6316b91df 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_verify_response_account.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_verify_response_account.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_create_request.rb index e107850ae..12bcc4c05 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -279,8 +279,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -298,7 +296,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_get_response.rb index 5d32bc20c..f0c4397ce 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_list_response.rb index 6c5087e23..eb5640055 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -201,8 +201,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -220,7 +218,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response.rb index 00866bc43..b0f461683 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -278,8 +278,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -297,7 +295,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response_o_auth.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response_o_auth.rb index 7a2b06717..a05cef9e1 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response_o_auth.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response_o_auth.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -212,8 +212,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -231,7 +229,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response_options.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response_options.rb index 72fb1b6a1..8cb41c594 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -177,8 +177,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -196,7 +194,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response_owner_account.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response_owner_account.rb index d1db9ca07..e7a2c7f5e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response_owner_account.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response_owner_account.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb index d7915cec6..8c421aa0c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -306,8 +306,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -325,7 +323,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_update_request.rb index 6378e72b5..db9518ed3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_update_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -172,7 +172,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] domains Value to be assigned def domains=(domains) - if !domains.nil? && domains.length > 2 + if domains.length > 2 fail ArgumentError, 'invalid value for "domains", number of items must be less than or equal to 2.' end @@ -256,8 +256,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -275,7 +273,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response.rb index b6ebf5df3..a4a5e6de4 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -211,8 +211,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -230,7 +228,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb index 2262aac2c..0deeffdb2 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -464,8 +464,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -483,7 +481,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_list_response.rb index 79522d28a..9e63c14fc 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -201,8 +201,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -220,7 +218,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_response.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_response.rb index 56e425522..1b9532fcd 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -211,8 +211,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -230,7 +228,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_send_response.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_send_response.rb index 2808793ef..22e2e86aa 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_send_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_send_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_request.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_request.rb index e7d7db9ab..1826c0f4b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -292,8 +292,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -311,7 +309,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response.rb index e41a6e4bc..1d15ffdef 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb index aeaf1279d..303b60de6 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response.rb index de165b278..1b17f4e2a 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb index 7cbb29cc0..b21bef9e6 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/error_response.rb b/sdks/ruby/lib/dropbox-sign/models/error_response.rb index 0b148a82a..44ca97582 100644 --- a/sdks/ruby/lib/dropbox-sign/models/error_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/error_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -180,8 +180,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -199,7 +197,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb b/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb index 036a020fe..f9e5c412b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb +++ b/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -209,8 +209,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -228,7 +226,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/event_callback_request.rb b/sdks/ruby/lib/dropbox-sign/models/event_callback_request.rb index 77d399f4e..211e322da 100644 --- a/sdks/ruby/lib/dropbox-sign/models/event_callback_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/event_callback_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -210,8 +210,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -229,7 +227,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event.rb b/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event.rb index a32568822..c1c22c3dd 100644 --- a/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event.rb +++ b/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -258,8 +258,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -277,7 +275,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event_metadata.rb b/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event_metadata.rb index b7b27dee0..99f0558b4 100644 --- a/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event_metadata.rb +++ b/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event_metadata.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -214,8 +214,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -233,7 +231,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/file_response.rb b/sdks/ruby/lib/dropbox-sign/models/file_response.rb index 86c6fffec..8836237a4 100644 --- a/sdks/ruby/lib/dropbox-sign/models/file_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/file_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -187,8 +187,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -206,7 +204,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/file_response_data_uri.rb b/sdks/ruby/lib/dropbox-sign/models/file_response_data_uri.rb index 08f313737..7c11af518 100644 --- a/sdks/ruby/lib/dropbox-sign/models/file_response_data_uri.rb +++ b/sdks/ruby/lib/dropbox-sign/models/file_response_data_uri.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/list_info_response.rb b/sdks/ruby/lib/dropbox-sign/models/list_info_response.rb index 282bbcbb8..78525c9b3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/list_info_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/list_info_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -211,8 +211,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -230,7 +228,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_generate_request.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_generate_request.rb index e726cd4f6..65705aca5 100644 --- a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_generate_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_generate_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -247,8 +247,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -266,7 +264,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_refresh_request.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_refresh_request.rb index 421fc1275..30b3c9c4d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_refresh_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_refresh_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -199,8 +199,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -218,7 +216,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_response.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_response.rb index fb80905c3..874c41743 100644 --- a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -217,8 +217,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -236,7 +234,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/report_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/report_create_request.rb index 84efa4a91..906f13393 100644 --- a/sdks/ruby/lib/dropbox-sign/models/report_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/report_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -247,8 +247,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -266,7 +264,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/report_create_response.rb b/sdks/ruby/lib/dropbox-sign/models/report_create_response.rb index 0f3957aef..e2c840341 100644 --- a/sdks/ruby/lib/dropbox-sign/models/report_create_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/report_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/report_response.rb b/sdks/ruby/lib/dropbox-sign/models/report_response.rb index 50341513a..dfc290245 100644 --- a/sdks/ruby/lib/dropbox-sign/models/report_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/report_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -234,8 +234,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -253,7 +251,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb index 9ef971bae..f7bc3b707 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -267,7 +267,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -283,7 +283,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -293,7 +293,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -383,8 +383,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -402,7 +400,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb index ba6a2435e..da98e8797 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -262,7 +262,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -278,7 +278,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -288,7 +288,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -378,8 +378,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -397,7 +395,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_request.rb index b7f002328..842a341ea 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -391,7 +391,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -407,7 +407,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -417,7 +417,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -518,8 +518,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -537,7 +535,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb index 5912d04e5..2ca96b6ce 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -297,7 +297,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -313,7 +313,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -323,7 +323,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -415,8 +415,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -434,7 +432,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_get_response.rb index 0f0042dc0..6b0931714 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_list_response.rb index 7625b55e5..11aefe57f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -201,8 +201,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -220,7 +218,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_remind_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_remind_request.rb index 77a41fc90..87fa9f182 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_remind_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_remind_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -192,8 +192,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -211,7 +209,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response.rb index 19a7f6321..c6c8ff11d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -466,8 +466,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -485,7 +483,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_attachment.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_attachment.rb index d522a1d98..f44274223 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_attachment.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_attachment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -254,8 +254,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -273,7 +271,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb index 11cd47891..8645b255e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -246,8 +246,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -265,7 +263,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb index 4d0303b29..cb119c85e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -199,8 +199,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -218,7 +216,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb index debaa672e..d61464643 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -199,8 +199,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -218,7 +216,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb index 8a405293a..38d4cd604 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -21,6 +21,10 @@ class SignatureRequestResponseCustomFieldTypeEnum TEXT = "text".freeze CHECKBOX = "checkbox".freeze + def self.all_vars + @all_vars ||= [TEXT, CHECKBOX].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -32,9 +36,9 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SignatureRequestResponseCustomFieldTypeEnum.constants.select { |c| SignatureRequestResponseCustomFieldTypeEnum::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #SignatureRequestResponseCustomFieldTypeEnum" if constantValues.empty? - value + return value if SignatureRequestResponseCustomFieldTypeEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SignatureRequestResponseCustomFieldTypeEnum" end end + end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_base.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_base.rb index 96c6ed0c8..2f6a5154b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -256,8 +256,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -275,7 +273,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb index c004cb233..a8dcbb734 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -28,6 +28,10 @@ class SignatureRequestResponseDataTypeEnum TEXT_MERGE = "text-merge".freeze CHECKBOX_MERGE = "checkbox-merge".freeze + def self.all_vars + @all_vars ||= [TEXT, CHECKBOX, DATE_SIGNED, DROPDOWN, INITIALS, RADIO, SIGNATURE, TEXT_MERGE, CHECKBOX_MERGE].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -39,9 +43,9 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SignatureRequestResponseDataTypeEnum.constants.select { |c| SignatureRequestResponseDataTypeEnum::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #SignatureRequestResponseDataTypeEnum" if constantValues.empty? - value + return value if SignatureRequestResponseDataTypeEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SignatureRequestResponseDataTypeEnum" end end + end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb index 6d94ce938..ec714d431 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb index a168a72b0..60f6e8134 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb index 53328835d..2fb316dc3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb index f260e6521..162f875e1 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb index 8bf812036..070722e7f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb index dbd7b19ac..1d6846041 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb index 51246724d..18ef029fb 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text.rb index ec99cce8c..ebe37746d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb index 00bd49833..3b8f95c8b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_signatures.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_signatures.rb index 33670a8b4..c543fcb62 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_signatures.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_signatures.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -390,8 +390,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -409,7 +407,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_send_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_send_request.rb index ca93a2d23..999fdd302 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_send_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_send_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -408,7 +408,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -424,7 +424,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -434,7 +434,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -537,8 +537,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -556,7 +554,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_send_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_send_with_template_request.rb index e7d1295d7..c6afc6548 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_send_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_send_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -17,6 +17,7 @@ module Dropbox end module Dropbox::Sign + # class SignatureRequestSendWithTemplateRequest # Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. # @return [Array] @@ -314,7 +315,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -330,7 +331,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -340,7 +341,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -434,8 +435,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -453,7 +452,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_update_request.rb index 3caf01343..72ce65152 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_update_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -215,8 +215,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -234,7 +232,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_attachment.rb b/sdks/ruby/lib/dropbox-sign/models/sub_attachment.rb index 46c3e806b..a34d70302 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_attachment.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_attachment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -221,8 +221,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -240,7 +238,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb index 1300e3b45..5457753b7 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -191,8 +191,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -210,7 +208,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb index c7f0a6909..18162fe89 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -197,8 +197,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -216,7 +214,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_cc.rb b/sdks/ruby/lib/dropbox-sign/models/sub_cc.rb index 5f1de6dde..36b50fbcc 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_cc.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_cc.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -197,8 +197,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -216,7 +214,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_custom_field.rb b/sdks/ruby/lib/dropbox-sign/models/sub_custom_field.rb index 72c531c07..d5b7a8ede 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_custom_field.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_custom_field.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -217,8 +217,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -236,7 +234,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_editor_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_editor_options.rb index febed1fda..807df8f32 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_editor_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_editor_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -192,8 +192,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -211,7 +209,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_field_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_field_options.rb index c048644c3..39b24eb1a 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_field_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_field_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -216,8 +216,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -235,7 +233,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_group.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_group.rb index 3c9f78a11..f5228ab27 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_group.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_group.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -213,8 +213,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -232,7 +230,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule.rb index 3e5da0434..6962f1455 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -282,8 +282,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -301,7 +299,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_action.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_action.rb index 8aa485ab2..c72934c86 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_action.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_action.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -252,8 +252,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -271,7 +269,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb index f2e8c3c91..d5e041d17 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -255,8 +255,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -274,7 +272,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb index 34b9c8821..9c57bcad2 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -371,8 +371,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -390,7 +388,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb index 04f8cfbf2..2587fd3bd 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -215,8 +215,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -234,7 +232,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb index 1d60d0fc7..bcfc7bc17 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb index f6ef58648..4d1d03a63 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -246,8 +246,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -265,7 +263,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb index 84967b0c4..9f3351fe3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -294,8 +294,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -313,7 +311,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb index 4fdcb10e5..a82167834 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -35,6 +35,10 @@ class SubFormFieldsPerDocumentFontEnum NOTO_HEBREW_REGULAR = "notoHebrew-Regular".freeze NOTO_SAN_THAI_MERGED = "notoSanThaiMerged".freeze + def self.all_vars + @all_vars ||= [HELVETICA, ARIAL, COURIER, CALIBRI, CAMBRIA, GEORGIA, TIMES, TREBUCHET, VERDANA, ROBOTO, ROBOTO_MONO, NOTO_SANS, NOTO_SERIF, NOTO_CJK_JP_REGULAR, NOTO_HEBREW_REGULAR, NOTO_SAN_THAI_MERGED].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -46,9 +50,9 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SubFormFieldsPerDocumentFontEnum.constants.select { |c| SubFormFieldsPerDocumentFontEnum::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #SubFormFieldsPerDocumentFontEnum" if constantValues.empty? - value + return value if SubFormFieldsPerDocumentFontEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SubFormFieldsPerDocumentFontEnum" end end + end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb index d55365d5d..86db89d2b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -278,8 +278,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -297,7 +295,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb index 8b6c0976f..c06271f46 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb index a3971ae4f..17b1a2dfb 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -220,8 +220,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -239,7 +237,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb index 052fe7995..b8d5ee8f7 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb index b34233a77..d6e149e54 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -344,8 +344,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -363,7 +361,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb index 6818e2ea9..3aface53b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -246,8 +246,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -265,7 +263,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb index a2880621e..3c7c37847 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -29,6 +29,10 @@ class SubFormFieldsPerDocumentTypeEnum TEXT = "text".freeze TEXT_MERGE = "text-merge".freeze + def self.all_vars + @all_vars ||= [CHECKBOX, CHECKBOX_MERGE, DATE_SIGNED, DROPDOWN, HYPERLINK, INITIALS, SIGNATURE, RADIO, TEXT, TEXT_MERGE].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -40,9 +44,9 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SubFormFieldsPerDocumentTypeEnum.constants.select { |c| SubFormFieldsPerDocumentTypeEnum::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #SubFormFieldsPerDocumentTypeEnum" if constantValues.empty? - value + return value if SubFormFieldsPerDocumentTypeEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SubFormFieldsPerDocumentTypeEnum" end end + end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_merge_field.rb b/sdks/ruby/lib/dropbox-sign/models/sub_merge_field.rb index 0beee35cf..768856c3d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_merge_field.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_merge_field.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -231,8 +231,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -250,7 +248,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_o_auth.rb b/sdks/ruby/lib/dropbox-sign/models/sub_o_auth.rb index 5733f2f4d..97923c366 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_o_auth.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_o_auth.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -212,8 +212,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -231,7 +229,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_options.rb index 373e48da2..6d1a3de8c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -179,8 +179,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -198,7 +196,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb index 8be164375..06749cfd3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -211,8 +211,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -230,7 +228,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_signer.rb b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_signer.rb index d9d01e17b..9f76fca44 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_signer.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_signer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -203,11 +203,11 @@ def valid? # Custom attribute writer method with validation # @param [Object] pin Value to be assigned def pin=(pin) - if !pin.nil? && pin.to_s.length > 12 + if pin.to_s.length > 12 fail ArgumentError, 'invalid value for "pin", the character length must be smaller than or equal to 12.' end - if !pin.nil? && pin.to_s.length < 4 + if pin.to_s.length < 4 fail ArgumentError, 'invalid value for "pin", the character length must be great than or equal to 4.' end @@ -300,8 +300,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -319,7 +317,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_template_signer.rb b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_template_signer.rb index d00222ebc..3191b6268 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_template_signer.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_template_signer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -207,11 +207,11 @@ def valid? # Custom attribute writer method with validation # @param [Object] pin Value to be assigned def pin=(pin) - if !pin.nil? && pin.to_s.length > 12 + if pin.to_s.length > 12 fail ArgumentError, 'invalid value for "pin", the character length must be smaller than or equal to 12.' end - if !pin.nil? && pin.to_s.length < 4 + if pin.to_s.length < 4 fail ArgumentError, 'invalid value for "pin", the character length must be great than or equal to 4.' end @@ -304,8 +304,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -323,7 +321,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_signing_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_signing_options.rb index 704d3b86d..4156b034c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_signing_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_signing_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -268,8 +268,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -287,7 +285,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_team_response.rb b/sdks/ruby/lib/dropbox-sign/models/sub_team_response.rb index 89841dfdd..c6fb00d45 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_team_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_team_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -187,8 +187,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -206,7 +204,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_template_role.rb b/sdks/ruby/lib/dropbox-sign/models/sub_template_role.rb index d30d3ef14..88a43b975 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_template_role.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_template_role.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb b/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb index b503d876d..05f8cca07 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -209,8 +209,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -228,7 +226,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb b/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb index 7a5b462e6..3bcbee3bf 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -213,8 +213,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -232,7 +230,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_white_labeling_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_white_labeling_options.rb index c9a6cbece..4d34636f6 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_white_labeling_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_white_labeling_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -379,8 +379,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -398,7 +396,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_add_member_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_add_member_request.rb index 15278bd55..f09af189f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_add_member_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_add_member_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -232,8 +232,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -251,7 +249,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb index 2593f4ff2..ef4d9061c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -178,8 +178,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -197,7 +195,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_get_info_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_get_info_response.rb index bec69c0a7..b8719b60e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_get_info_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_get_info_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_get_response.rb index 5532dd0e8..409acdaab 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_info_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_info_response.rb index f047339cc..31b39ab86 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_info_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_info_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -220,8 +220,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -239,7 +237,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_invite_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_invite_response.rb index 3aff02998..41e022fe8 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_invite_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_invite_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -231,8 +231,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -250,7 +248,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_invites_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_invites_response.rb index 0edbe0dd1..11c138fd0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_invites_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_invites_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -190,8 +190,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -209,7 +207,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_member_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_member_response.rb index e8b4a0b05..19549cb82 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_member_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_member_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -198,8 +198,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -217,7 +215,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_members_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_members_response.rb index f22a22ec5..916000f7f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_members_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_members_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -200,8 +200,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -219,7 +217,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_parent_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_parent_response.rb index 64c8aa687..b16bc6ed6 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_parent_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_parent_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_remove_member_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_remove_member_request.rb index 44b5cc5c2..cf53f5a2b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_remove_member_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_remove_member_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -254,8 +254,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -273,7 +271,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_response.rb index 5ffff82ba..69b48d297 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -215,8 +215,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -234,7 +232,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_sub_teams_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_sub_teams_response.rb index 073f2e38c..7bf682066 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_sub_teams_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_sub_teams_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -200,8 +200,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -219,7 +217,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_update_request.rb index 5ded0903f..2e9095c45 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_update_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_add_user_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_add_user_request.rb index 75b091993..d158c71b0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_add_user_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_add_user_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -200,8 +200,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -219,7 +217,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_request.rb index 990bd25a0..267e6a8b4 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -399,7 +399,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -415,7 +415,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 200 + if subject.to_s.length > 200 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 200.' end @@ -517,8 +517,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -536,7 +534,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response.rb index 6987f9522..21fe69585 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb index b19cbf79c..32f6e4a27 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -212,8 +212,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -231,7 +229,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_request.rb index 90f10a18c..ada67c6c1 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -323,7 +323,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -339,7 +339,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 200 + if subject.to_s.length > 200 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 200.' end @@ -434,8 +434,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -453,7 +451,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_response.rb index 49354f107..fd6621565 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_response_template.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_response_template.rb index 21c4043a0..9cc402daf 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_response_template.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_response_template.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -177,8 +177,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -196,7 +194,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_edit_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_edit_response.rb index 52f33ba56..3232a7a14 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_edit_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_edit_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_get_response.rb index 05e764a91..05b1b12d6 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_list_response.rb index 1eeff5f55..ac89c1405 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -201,8 +201,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -220,7 +218,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_remove_user_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_remove_user_request.rb index 264e3c2f5..9b2541321 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_remove_user_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_remove_user_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -187,8 +187,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -206,7 +204,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_response.rb index 2b09f5213..8cccc09f2 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -350,8 +350,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -369,7 +367,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_account.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_account.rb index b2dd0a5da..a50192718 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_account.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_account.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -230,8 +230,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -249,7 +247,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_account_quota.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_account_quota.rb index 64783faba..3158b0ef9 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_account_quota.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_account_quota.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -210,8 +210,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -229,7 +227,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_cc_role.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_cc_role.rb index 02ee1667e..a22b6b267 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_cc_role.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_cc_role.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb index ded906a23..3aca3b069 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -240,8 +240,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -259,7 +257,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_base.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_base.rb index cfd8180be..5c7d09966 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -297,8 +297,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -316,7 +314,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb index ba2bc047f..4740d8976 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_text.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_text.rb index c6e239061..f1c017ea5 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -231,8 +231,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -250,7 +248,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group.rb index 81112e915..376201721 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -186,8 +186,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -205,7 +203,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group_rule.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group_rule.rb index cf521757a..06cb5cb02 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group_rule.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group_rule.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_base.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_base.rb index 603958528..0b5b6cd15 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -314,8 +314,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -333,7 +331,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb index e6d613246..15d5e6355 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb index b1a6085e8..1e29dfb50 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb index 30b168489..7106be31d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb index 7fd1e1b95..1732efebe 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -231,8 +231,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -250,7 +248,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_initials.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_initials.rb index 9182028d4..798686d8a 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_initials.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_initials.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_radio.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_radio.rb index e3e866f68..c5055af76 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_radio.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_radio.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_signature.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_signature.rb index 600833ddb..9bdd4fdee 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_signature.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_signature.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_text.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_text.rb index 2dc5e9b64..b5c12a275 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -277,8 +277,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -296,7 +294,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_base.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_base.rb index dc6b26e4d..37f808544 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -316,8 +316,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -335,7 +333,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb index 3d3770498..051f8a707 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb index 89f5c6f55..88ffa8e1f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb index 86f0ccbae..a326332dc 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb index 3def794d7..0cbfed71d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_initials.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_initials.rb index c9aef480c..cc058cdef 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_initials.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_initials.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_radio.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_radio.rb index eb7912257..47e993b81 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_radio.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_radio.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_signature.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_signature.rb index c00b20d40..3cfcedf81 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_signature.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_signature.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_text.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_text.rb index a29b9711a..44f94567f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_field_avg_text_length.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_field_avg_text_length.rb index 0f60e2687..14c10f905 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_field_avg_text_length.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_field_avg_text_length.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_signer_role.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_signer_role.rb index fcc2a57d7..36a2a7459 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_signer_role.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_signer_role.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -187,8 +187,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -206,7 +204,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_update_files_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_update_files_request.rb index 4955d6410..41c951c37 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_update_files_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_update_files_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -174,7 +174,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -184,7 +184,7 @@ def message=(message) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 100 + if subject.to_s.length > 100 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 100.' end @@ -267,8 +267,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -286,7 +284,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_update_files_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_update_files_response.rb index c721dd61f..fe17fbd74 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_update_files_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_update_files_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -175,8 +175,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -194,7 +192,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_update_files_response_template.rb b/sdks/ruby/lib/dropbox-sign/models/template_update_files_response_template.rb index 555eac400..d2e59261f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_update_files_response_template.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_update_files_response_template.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -190,8 +190,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -209,7 +207,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb index 2b61c9d4b..aedbab5ef 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -17,6 +17,7 @@ module Dropbox end module Dropbox::Sign + # class UnclaimedDraftCreateEmbeddedRequest # Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. # @return [String] @@ -550,7 +551,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -566,7 +567,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 200 + if subject.to_s.length > 200 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 200.' end @@ -689,8 +690,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -708,7 +707,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb index a20436216..50e7e43b3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -465,7 +465,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -481,7 +481,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -491,7 +491,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -598,8 +598,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -617,7 +615,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_request.rb index 560e0e7ab..4b64c81b8 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -17,6 +17,7 @@ module Dropbox end module Dropbox::Sign + # class UnclaimedDraftCreateRequest # The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional. # @return [String] @@ -418,7 +419,7 @@ def type=(type) # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -434,7 +435,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 200 + if subject.to_s.length > 200 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 200.' end @@ -535,8 +536,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -554,7 +553,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_response.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_response.rb index c83bc11a5..ccb3d71ef 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb index dbb8775f6..7d56b5e4e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -261,8 +261,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -280,7 +278,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_response.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_response.rb index 55a695d35..ddcc68f7d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -236,8 +236,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -255,7 +253,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/models/warning_response.rb b/sdks/ruby/lib/dropbox-sign/models/warning_response.rb index 60d28e218..92156f416 100644 --- a/sdks/ruby/lib/dropbox-sign/models/warning_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/warning_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -198,8 +198,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -217,7 +215,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/lib/dropbox-sign/version.rb b/sdks/ruby/lib/dropbox-sign/version.rb index fc539a942..735f509c0 100644 --- a/sdks/ruby/lib/dropbox-sign/version.rb +++ b/sdks/ruby/lib/dropbox-sign/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end @@ -14,5 +14,5 @@ module Dropbox end module Dropbox::Sign - VERSION = '1.4-dev' + VERSION = '1.5-dev' end diff --git a/sdks/ruby/openapi-config.yaml b/sdks/ruby/openapi-config.yaml index dbea67aec..96399d268 100644 --- a/sdks/ruby/openapi-config.yaml +++ b/sdks/ruby/openapi-config.yaml @@ -9,7 +9,7 @@ additionalProperties: gemName: dropbox-sign gemRequiredRubyVersion: '>= 2.7' moduleName: "Dropbox::Sign" - gemVersion: 1.4-dev + gemVersion: 1.5-dev sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true gitUserId: hellosign diff --git a/sdks/ruby/run-build b/sdks/ruby/run-build index 534643113..8639977ed 100755 --- a/sdks/ruby/run-build +++ b/sdks/ruby/run-build @@ -9,7 +9,7 @@ WORKING_DIR="/app/ruby" docker run --rm \ -v "${DIR}/:/local" \ - openapitools/openapi-generator-cli:v5.3.0 generate \ + openapitools/openapi-generator-cli:v7.7.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ diff --git a/sdks/ruby/spec/api_client_spec.rb b/sdks/ruby/spec/api_client_spec.rb index 209b85527..20e0ef8f4 100644 --- a/sdks/ruby/spec/api_client_spec.rb +++ b/sdks/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 6.6.0 =end @@ -89,6 +89,8 @@ end end + + describe '#deserialize' do it "handles Array" do api_client = Dropbox::Sign::ApiClient.new diff --git a/sdks/ruby/spec/configuration_spec.rb b/sdks/ruby/spec/configuration_spec.rb index 09c3746cb..eab18ff18 100644 --- a/sdks/ruby/spec/configuration_spec.rb +++ b/sdks/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 6.6.0 =end diff --git a/sdks/ruby/spec/spec_helper.rb b/sdks/ruby/spec/spec_helper.rb index 9a25a1f3f..59e8c7ef7 100644 --- a/sdks/ruby/spec/spec_helper.rb +++ b/sdks/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0 +Generator version: 7.7.0 =end diff --git a/sdks/ruby/templates/README.mustache b/sdks/ruby/templates/README.mustache index 25f3ef4f7..0c47d5ca1 100644 --- a/sdks/ruby/templates/README.mustache +++ b/sdks/ruby/templates/README.mustache @@ -31,6 +31,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} - Build package: {{generatorClass}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) diff --git a/sdks/ruby/templates/api.mustache b/sdks/ruby/templates/api.mustache index 4cd7b83cd..2519dd5b7 100644 --- a/sdks/ruby/templates/api.mustache +++ b/sdks/ruby/templates/api.mustache @@ -22,12 +22,30 @@ module {{moduleName}} {{#notes}} # {{{.}}} {{/notes}} -{{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}} -{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters -{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} -{{/required}}{{/allParams}} # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] - def {{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {}) - {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts) +{{#vendorExtensions.x-group-parameters}} + # @param [Hash] opts the parameters +{{#allParams}} +{{#required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}} (required) +{{/required}} +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} +{{^vendorExtensions.x-group-parameters}} +{{#allParams}} +{{#required}} + # @param {{paramName}} [{{{dataType}}}] {{description}} +{{/required}} +{{/allParams}} + # @param [Hash] opts the optional parameters +{{/vendorExtensions.x-group-parameters}} +{{#allParams}} +{{^required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} +{{/required}} +{{/allParams}} + # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] + def {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts = {}) + {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts) {{#returnType}}data{{/returnType}}{{^returnType}}nil{{/returnType}} end @@ -37,14 +55,42 @@ module {{moduleName}} {{#notes}} # {{.}} {{/notes}} -{{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}} -{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters -{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}} -{{/required}}{{/allParams}} # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers - def {{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {}) +{{#vendorExtensions.x-group-parameters}} + # @param [Hash] opts the parameters +{{#allParams}} +{{#required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}} (required) +{{/required}} +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} +{{^vendorExtensions.x-group-parameters}} +{{#allParams}} +{{#required}} + # @param {{paramName}} [{{{dataType}}}] {{description}} +{{/required}} +{{/allParams}} + # @param [Hash] opts the optional parameters +{{/vendorExtensions.x-group-parameters}} +{{#allParams}} +{{^required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} +{{/required}} +{{/allParams}} + # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers + def {{operationId}}_with_http_info({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: {{classname}}.{{operationId}} ...' end + {{#vendorExtensions.x-group-parameters}} + # unbox the parameters from the hash + {{#allParams}} + {{^isNullable}} + {{#required}} + {{{paramName}}} = opts[:'{{{paramName}}}'] + {{/required}} + {{/isNullable}} + {{/allParams}} + {{/vendorExtensions.x-group-parameters}} {{#allParams}} {{^isNullable}} {{#required}} @@ -161,7 +207,7 @@ module {{moduleName}} {{/headerParams}} {{#headerParams}} {{^required}} - header_params[:'{{{baseName}}}'] = {{#collectionFormat}}@api_client.build_collection_param(opts[:'{{{paramName}}}'], :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}opts[:'{{{paramName}}}']{{/collectionFormat}} if !opts[:'{{{paramName}}}'].nil? + header_params[{{#lambdaFixHeaderKey}}:'{{{baseName}}}'{{/lambdaFixHeaderKey}}] = {{#collectionFormat}}@api_client.build_collection_param(opts[:'{{{paramName}}}'], :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}opts[:'{{{paramName}}}']{{/collectionFormat}} if !opts[:'{{{paramName}}}'].nil? {{/required}} {{/headerParams}} diff --git a/sdks/ruby/templates/api_client.mustache b/sdks/ruby/templates/api_client.mustache index ebd3ab521..cba9c7cba 100644 --- a/sdks/ruby/templates/api_client.mustache +++ b/sdks/ruby/templates/api_client.mustache @@ -7,12 +7,18 @@ require 'json' require 'logger' require 'tempfile' require 'time' -{{^isFaraday}} +{{#isTyphoeus}} require 'typhoeus' -{{/isFaraday}} +{{/isTyphoeus}} {{#isFaraday}} require 'faraday' +require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') +require 'marcel' {{/isFaraday}} +{{#isHttpx}} +require 'httpx' +require 'net/http/status' +{{/isHttpx}} module Dropbox end @@ -42,12 +48,15 @@ module {{moduleName}} @@default ||= ApiClient.new end -{{^isFaraday}} +{{#isTyphoeus}} {{> api_client_typhoeus_partial}} -{{/isFaraday}} +{{/isTyphoeus}} {{#isFaraday}} {{> api_client_faraday_partial}} {{/isFaraday}} +{{#isHttpx}} +{{> api_client_httpx_partial}} +{{/isHttpx}} # Check if the given MIME is a JSON MIME. # JSON MIME examples: # application/json @@ -57,7 +66,7 @@ module {{moduleName}} # @param [String] mime MIME # @return [Boolean] True if the MIME is application/json def json_mime?(mime) - (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? + (mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil? end # Deserialize the response to the given return type. @@ -66,38 +75,10 @@ module {{moduleName}} # @param [String] return_type some examples: "User", "Array", "Hash" def deserialize(response, return_type) body = response.body - - # handle file downloading - return the File instance processed in request callbacks - # note that response body is empty when the file is written in chunks in request on_body callback - {{^isFaraday}} - return @tempfile if return_type == 'File' - {{/isFaraday}} - {{#isFaraday}} - if return_type == 'File' - content_disposition = response.headers['Content-Disposition'] - if content_disposition && content_disposition =~ /filename=/i - filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] - prefix = sanitize_filename(filename) - else - prefix = 'download-' - end - prefix = prefix + '-' unless prefix.end_with?('-') - encoding = body.encoding - @tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile.write(@stream.join.force_encoding(encoding)) - @tempfile.close - @config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - return @tempfile - end - {{/isFaraday}} - return nil if body.nil? || body.empty? # return response body directly for String return type - return body if return_type == 'String' + return body.to_s if return_type == 'String' # ensuring a default content type content_type = response.headers['Content-Type'] || 'application/json' @@ -164,7 +145,7 @@ module {{moduleName}} # @param [String] filename the filename to be sanitized # @return [String] the sanitized filename def sanitize_filename(filename) - filename.gsub(/.*[\/\\]/, '') + filename.split(/[\/\\]/).last end def build_request_url(path, opts = {}) diff --git a/sdks/ruby/templates/api_client_faraday_partial.mustache b/sdks/ruby/templates/api_client_faraday_partial.mustache index a32b6ab6a..1a85fc69c 100644 --- a/sdks/ruby/templates/api_client_faraday_partial.mustache +++ b/sdks/ruby/templates/api_client_faraday_partial.mustache @@ -3,50 +3,38 @@ # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: # the data deserialized from response body (could be nil), response status code and response headers. def call_api(http_method, path, opts = {}) - ssl_options = { - :ca_file => @config.ssl_ca_file, - :verify => @config.ssl_verify, - :verify_mode => @config.ssl_verify_mode, - :client_cert => @config.ssl_client_cert, - :client_key => @config.ssl_client_key - } - - connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn| - conn.request(:basic_auth, config.username, config.password) - @config.configure_middleware(conn) - if opts[:header_params]["Content-Type"] == "multipart/form-data" - conn.request :multipart - conn.request :url_encoded - end - conn.adapter(Faraday.default_adapter) - end - + stream = nil begin - response = connection.public_send(http_method.to_sym.downcase) do |req| - build_request(http_method, path, req, opts) + response = connection(opts).public_send(http_method.to_sym.downcase) do |req| + request = build_request(http_method, path, req, opts) + stream = download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary' end - if @config.debugging - @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" + if config.debugging + config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" end unless response.success? - if response.status == 0 + if response.status == 0 && response.respond_to?(:return_message) # Errors from libcurl will be made visible here - fail ApiError.new(:code => 0, - :message => response.return_message) + fail ApiError.new(code: 0, + message: response.return_message) else - fail ApiError.new(:code => response.status, - :response_headers => response.headers, - :response_body => response.body), + fail ApiError.new(code: response.status, + response_headers: response.headers, + response_body: response.body), response.reason_phrase end end rescue Faraday::TimeoutError fail ApiError.new('Connection timed out') + rescue Faraday::ConnectionFailed + fail ApiError.new('Connection failed') end - if opts[:return_type] + if opts[:return_type] == 'File' || opts[:return_type] == 'Binary' + data = deserialize_file(response, stream) + elsif opts[:return_type] data = deserialize(response, opts[:return_type]) else data = nil @@ -62,7 +50,7 @@ # @option opts [Hash] :query_params Query parameters # @option opts [Hash] :form_params Query parameters # @option opts [Object] :body HTTP body (JSON/XML) - # @return [Typhoeus::Request] A Typhoeus Request + # @return [Faraday::Request] A Faraday Request def build_request(http_method, path, request, opts = {}) url = build_request_url(path, opts) http_method = http_method.to_sym.downcase @@ -73,24 +61,21 @@ update_params_for_auth! header_params, query_params, opts[:auth_names] - req_opts = { - :params_encoding => @config.params_encoding, - :timeout => @config.timeout, - :verbose => @config.debugging - } - if [:post, :patch, :put, :delete].include?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) - if @config.debugging - @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" + if config.debugging + config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" end end request.headers = header_params request.body = req_body - request.options = OpenStruct.new(req_opts) + + # Overload default options only if provided + request.options.params_encoder = config.params_encoder if config.params_encoder + request.options.timeout = config.timeout if config.timeout + request.url url request.params = query_params - download_file(request) if opts[:return_type] == 'File' request end @@ -109,8 +94,7 @@ form_params.each do |key, value| case value when ::File, ::Tempfile - # TODO hardcode to application/octet-stream, need better way to detect content type - data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path) + data[key] = Faraday::FilePart.new(value.path, Marcel::MimeType.for(Pathname.new(value.path))) when ::Array, nil # let Faraday handle Array and nil parameters data[key] = value @@ -127,10 +111,84 @@ end def download_file(request) - @stream = [] + stream = [] # handle streaming Responses request.options.on_data = Proc.new do |chunk, overall_received_bytes| - @stream << chunk + stream << chunk + end + stream + end + + def deserialize_file(response, stream) + body = response.body + if @config.return_binary_data == true + # return byte stream + encoding = body.encoding + stream.join.force_encoding(encoding) + else + # return file instead of binary data + content_disposition = response.headers['Content-Disposition'] + if content_disposition && content_disposition =~ /filename=/i + filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] + prefix = sanitize_filename(filename) + else + prefix = 'download-' + end + prefix = prefix + '-' unless prefix.end_with?('-') + encoding = body.encoding + tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) + tempfile.write(stream.join.force_encoding(encoding)) + tempfile.close + config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + tempfile + end + end + + def connection(opts) + opts[:header_params]['Content-Type'] == 'multipart/form-data' ? connection_multipart : connection_regular + end + + def connection_multipart + @connection_multipart ||= build_connection do |conn| + conn.request :multipart + conn.request :url_encoded + end + end + + def connection_regular + @connection_regular ||= build_connection + end + + def build_connection + Faraday.new(url: config.base_url, ssl: ssl_options, proxy: config.proxy) do |conn| + basic_auth(conn) + config.configure_middleware(conn) + yield(conn) if block_given? + conn.adapter(Faraday.default_adapter) + config.configure_connection(conn) + end + end + + def ssl_options + { + ca_file: config.ssl_ca_file, + verify: config.ssl_verify, + verify_mode: config.ssl_verify_mode, + client_cert: config.ssl_client_cert, + client_key: config.ssl_client_key + } + end + + def basic_auth(conn) + if config.username && config.password + if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') + conn.request(:authorization, :basic, config.username, config.password) + else + conn.request(:basic_auth, config.username, config.password) + end end end diff --git a/sdks/ruby/templates/api_client_httpx_partial.mustache b/sdks/ruby/templates/api_client_httpx_partial.mustache new file mode 100644 index 000000000..7dd5221da --- /dev/null +++ b/sdks/ruby/templates/api_client_httpx_partial.mustache @@ -0,0 +1,134 @@ + # Call an API with given options. + # + # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: + # the data deserialized from response body (could be nil), response status code and response headers. + def call_api(http_method, path, opts = {}) + begin + response = build_request(http_method.to_s, path, opts) + + if config.debugging + config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" + end + + response.raise_for_status + + rescue HTTPX::HTTPError + fail ApiError.new(code: response.status, + response_headers: response.headers.to_h, + response_body: response.body.to_s), + Net::HTTP::STATUS_CODES.fetch(response.status, "HTTP Error (#{response.status})") + rescue HTTPX::TimeoutError + fail ApiError.new('Connection timed out') + rescue HTTPX::ConnectionError, HTTPX::ResolveError + fail ApiError.new('Connection failed') + end + + if opts[:return_type] == 'File' + data = deserialize_file(response) + elsif opts[:return_type] + data = deserialize(response, opts[:return_type]) + else + data = nil + end + return data, response.status, response.headers.to_h + end + + # Builds the HTTP request + # + # @param [String] http_method HTTP method/verb (e.g. POST) + # @param [String] path URL path (e.g. /account/new) + # @option opts [Hash] :header_params Header parameters + # @option opts [Hash] :query_params Query parameters + # @option opts [Hash] :form_params Query parameters + # @option opts [Object] :body HTTP body (JSON/XML) + # @return [HTTPX::Request] A Request object + def build_request(http_method, path, opts = {}) + url = build_request_url(path, opts) + + header_params = @default_headers.merge(opts[:header_params] || {}) + query_params = opts[:query_params] || {} + form_params = opts[:form_params] || {} + + update_params_for_auth! header_params, query_params, opts[:auth_names] + + if %w[POST PATCH PUT DELETE].include?(http_method) + body_params = build_request_body(header_params, form_params, opts[:body]) + if config.debugging + config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" + end + end + req_opts = { + :headers => HTTPX::Headers.new(header_params) + } + req_opts.merge!(body_params) if body_params + req_opts[:params] = query_params if query_params && !query_params.empty? + session.request(http_method, url, **req_opts) + end + + # Builds the HTTP request body + # + # @param [Hash] header_params Header parameters + # @param [Hash] form_params Query parameters + # @param [Object] body HTTP body (JSON/XML) + # @return [Hash{Symbol => Object}] body options as HTTPX handles them + def build_request_body(header_params, form_params, body) + # http form + if header_params['Content-Type'] == 'application/x-www-form-urlencoded' || + header_params['Content-Type'] == 'multipart/form-data' + header_params.delete('Content-Type') # httpx takes care of this + { form: form_params } + elsif body + body.is_a?(String) ? { body: body } : { json: body } + end + end + + def deserialize_file(response) + body = response.body + if @config.return_binary_data == true + # TODO: force response encoding + body.to_s + else + content_disposition = response.headers['content-disposition'] + if content_disposition && content_disposition =~ /filename=/i + filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] + prefix = sanitize_filename(filename) + else + prefix = 'download-' + end + prefix = prefix + '-' unless prefix.end_with?('-') + encoding = response.body.encoding + tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) + response.copy_to(tempfile) + tempfile.close + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + + tempfile + end + end + + def session + return @session if defined?(@session) + + session = HTTPX.with( + ssl: @config.ssl, + timeout: ({ request_timeout: @config.timeout } if @config.timeout && @config.timeout.positive?), + origin: "#{@config.scheme}://#{@config.host}", + base_path: (@config.base_path.sub(/\/+\z/, '') if @config.base_path) + ) + + if @config.proxy + session = session.plugin(:proxy, proxy: @config.proxy) + end + + if @config.username && @config.password + session = session.plugin(:basic_auth).basic_auth(@config.username, @config.password) + end + + session = @config.configure(session) + + @session = session + + end diff --git a/sdks/ruby/templates/api_client_spec.mustache b/sdks/ruby/templates/api_client_spec.mustache deleted file mode 100644 index 86a7bd9bd..000000000 --- a/sdks/ruby/templates/api_client_spec.mustache +++ /dev/null @@ -1,220 +0,0 @@ -=begin -{{> api_info}} -=end - -require 'spec_helper' - -describe {{moduleName}}::ApiClient do - context 'initialization' do - context 'URL stuff' do - context 'host' do - it 'removes http from host' do - {{moduleName}}.configure { |c| c.host = 'http://example.com' } - expect({{moduleName}}::Configuration.default.host).to eq('example.com') - end - - it 'removes https from host' do - {{moduleName}}.configure { |c| c.host = 'https://wookiee.com' } - expect({{moduleName}}::ApiClient.default.config.host).to eq('wookiee.com') - end - - it 'removes trailing path from host' do - {{moduleName}}.configure { |c| c.host = 'hobo.com/v4' } - expect({{moduleName}}::Configuration.default.host).to eq('hobo.com') - end - end - - context 'base_path' do - it "prepends a slash to base_path" do - {{moduleName}}.configure { |c| c.base_path = 'v4/dog' } - expect({{moduleName}}::Configuration.default.base_path).to eq('/v4/dog') - end - - it "doesn't prepend a slash if one is already there" do - {{moduleName}}.configure { |c| c.base_path = '/v4/dog' } - expect({{moduleName}}::Configuration.default.base_path).to eq('/v4/dog') - end - - it "ends up as a blank string if nil" do - {{moduleName}}.configure { |c| c.base_path = nil } - expect({{moduleName}}::Configuration.default.base_path).to eq('') - end - end - end - end - -{{^isFaraday}} - describe 'params_encoding in #build_request' do - let(:config) { {{moduleName}}::Configuration.new } - let(:api_client) { {{moduleName}}::ApiClient.new(config) } - - it 'defaults to nil' do - expect({{moduleName}}::Configuration.default.params_encoding).to eq(nil) - expect(config.params_encoding).to eq(nil) - - request = api_client.build_request(:get, '/test') - expect(request.options[:params_encoding]).to eq(nil) - end - - it 'can be customized' do - config.params_encoding = :multi - request = api_client.build_request(:get, '/test') - expect(request.options[:params_encoding]).to eq(:multi) - end - end - - describe 'timeout in #build_request' do - let(:config) { {{moduleName}}::Configuration.new } - let(:api_client) { {{moduleName}}::ApiClient.new(config) } - - it 'defaults to 0' do - expect({{moduleName}}::Configuration.default.timeout).to eq(0) - expect(config.timeout).to eq(0) - - request = api_client.build_request(:get, '/test') - expect(request.options[:timeout]).to eq(0) - end - - it 'can be customized' do - config.timeout = 100 - request = api_client.build_request(:get, '/test') - expect(request.options[:timeout]).to eq(100) - end - end - -{{/isFaraday}} - describe '#deserialize' do - it "handles Array" do - api_client = {{moduleName}}::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '[12, 34]') - data = api_client.deserialize(response, 'Array') - expect(data).to be_instance_of(Array) - expect(data).to eq([12, 34]) - end - - it 'handles Array>' do - api_client = {{moduleName}}::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '[[12, 34], [56]]') - data = api_client.deserialize(response, 'Array>') - expect(data).to be_instance_of(Array) - expect(data).to eq([[12, 34], [56]]) - end - - it 'handles Hash' do - api_client = {{moduleName}}::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '{"message": "Hello"}') - data = api_client.deserialize(response, 'Hash') - expect(data).to be_instance_of(Hash) - expect(data).to eq(:message => 'Hello') - end - end - - describe "#object_to_hash" do - it 'ignores nils and includes empty arrays' do - # uncomment below to test object_to_hash for model - # api_client = {{moduleName}}::ApiClient.new - # _model = {{moduleName}}::ModelName.new - # update the model attribute below - # _model.id = 1 - # update the expected value (hash) below - # expected = {id: 1, name: '', tags: []} - # expect(api_client.object_to_hash(_model)).to eq(expected) - end - end - - describe '#build_collection_param' do - let(:param) { ['aa', 'bb', 'cc'] } - let(:api_client) { {{moduleName}}::ApiClient.new } - - it 'works for csv' do - expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc') - end - - it 'works for ssv' do - expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc') - end - - it 'works for tsv' do - expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc") - end - - it 'works for pipes' do - expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc') - end - - it 'works for multi' do - expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc']) - end - - it 'fails for invalid collection format' do - expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID') - end - end - - describe '#json_mime?' do - let(:api_client) { {{moduleName}}::ApiClient.new } - - it 'works' do - expect(api_client.json_mime?(nil)).to eq false - expect(api_client.json_mime?('')).to eq false - - expect(api_client.json_mime?('application/json')).to eq true - expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true - expect(api_client.json_mime?('APPLICATION/JSON')).to eq true - - expect(api_client.json_mime?('application/xml')).to eq false - expect(api_client.json_mime?('text/plain')).to eq false - expect(api_client.json_mime?('application/jsonp')).to eq false - end - end - - describe '#select_header_accept' do - let(:api_client) { {{moduleName}}::ApiClient.new } - - it 'works' do - expect(api_client.select_header_accept(nil)).to be_nil - expect(api_client.select_header_accept([])).to be_nil - - expect(api_client.select_header_accept(['application/json'])).to eq('application/json') - expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') - expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') - - expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml') - expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml') - end - end - - describe '#select_header_content_type' do - let(:api_client) { {{moduleName}}::ApiClient.new } - - it 'works' do - expect(api_client.select_header_content_type(nil)).to be_nil - expect(api_client.select_header_content_type([])).to be_nil - - expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') - expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') - expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') - expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml') - expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain') - end - end - - describe '#sanitize_filename' do - let(:api_client) { {{moduleName}}::ApiClient.new } - - it 'works' do - expect(api_client.sanitize_filename('sun')).to eq('sun') - expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif') - end - end -end diff --git a/sdks/ruby/templates/api_client_typhoeus_partial.mustache b/sdks/ruby/templates/api_client_typhoeus_partial.mustache index e0c9e7cc1..e8162ac7f 100644 --- a/sdks/ruby/templates/api_client_typhoeus_partial.mustache +++ b/sdks/ruby/templates/api_client_typhoeus_partial.mustache @@ -1,9 +1,10 @@ # Call an API with given options. # # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: - # the data deserialized from response body (could be nil), response status code and response headers. + # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers. def call_api(http_method, path, opts = {}) request = build_request(http_method, path, opts) + tempfile = download_file(request) if opts[:return_type] == 'File' response = request.run if @config.debugging @@ -25,7 +26,9 @@ end end - if opts[:return_type] + if opts[:return_type] == 'File' + data = tempfile + elsif opts[:return_type] data = deserialize(response, opts[:return_type]) else data = nil @@ -49,6 +52,7 @@ header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true {{#hasAuthMethods}} update_params_for_auth! header_params, query_params, opts[:auth_names] @@ -67,7 +71,8 @@ :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided @@ -81,9 +86,7 @@ end end - request = Typhoeus::Request.new(url, req_opts) - download_file(request) if opts[:return_type] == 'File' - request + Typhoeus::Request.new(url, req_opts) end # Builds the HTTP request body @@ -121,6 +124,8 @@ # process can use. # # @see Configuration#temp_folder_path + # + # @return [Tempfile] the tempfile generated def download_file(request) tempfile = nil encoding = nil @@ -135,19 +140,22 @@ prefix = prefix + '-' unless prefix.end_with?('-') encoding = response.body.encoding tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile = tempfile end request.on_body do |chunk| chunk.force_encoding(encoding) tempfile.write(chunk) end - request.on_complete do |response| - if tempfile - tempfile.close - @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - end + # run the request to ensure the tempfile is created successfully before returning it + request.run + if tempfile + tempfile.close + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + else + fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}") end + + tempfile end diff --git a/sdks/ruby/templates/api_doc.mustache b/sdks/ruby/templates/api_doc.mustache index e1c4ab6d6..e9677529d 100644 --- a/sdks/ruby/templates/api_doc.mustache +++ b/sdks/ruby/templates/api_doc.mustache @@ -38,7 +38,7 @@ This returns an Array which contains the response data{{^returnType}} (`nil` in ```ruby begin {{#summary}}# {{{.}}}{{/summary}} - data, status_code, headers = api_instance.{{{operationId}}}_with_http_info{{#hasParams}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}){{/hasParams}} + data, status_code, headers = api_instance.{{{operationId}}}_with_http_info{{#hasParams}}({{^vendorExtensions.x-group-parameters}}{{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}opts{{/vendorExtensions.x-group-parameters}}){{/hasParams}} p status_code # => 2xx p headers # => { ... } p data # => {{#returnType}}{{#returnTypeIsPrimitive}}{{returnType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}<{{{returnType}}}>{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}nil{{/returnType}} diff --git a/sdks/ruby/templates/api_error.mustache b/sdks/ruby/templates/api_error.mustache index 79abab61a..ef2e6dfc4 100644 --- a/sdks/ruby/templates/api_error.mustache +++ b/sdks/ruby/templates/api_error.mustache @@ -27,6 +27,7 @@ module {{moduleName}} end else super arg + @message = arg end end diff --git a/sdks/ruby/templates/api_info.mustache b/sdks/ruby/templates/api_info.mustache index 272f72624..be6dda917 100644 --- a/sdks/ruby/templates/api_info.mustache +++ b/sdks/ruby/templates/api_info.mustache @@ -9,4 +9,4 @@ {{#version}}The version of the OpenAPI document: {{.}}{{/version}} {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} Generated by: https://openapi-generator.tech -OpenAPI Generator version: {{{generatorVersion}}} +Generator version: {{{generatorVersion}}} diff --git a/sdks/ruby/templates/api_test.mustache b/sdks/ruby/templates/api_test.mustache index 2ab6515a9..7079f97e7 100644 --- a/sdks/ruby/templates/api_test.mustache +++ b/sdks/ruby/templates/api_test.mustache @@ -38,7 +38,7 @@ require 'json' {{/required}}{{/allParams}} # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] describe '{{operationId}} test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/sdks/ruby/templates/base_object.mustache b/sdks/ruby/templates/base_object.mustache index ce5f199b1..03ea14145 100644 --- a/sdks/ruby/templates/base_object.mustache +++ b/sdks/ruby/templates/base_object.mustache @@ -61,8 +61,6 @@ else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -80,7 +78,7 @@ else # model # models (e.g. Pet) klass = {{moduleName}}.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/sdks/ruby/templates/configuration.mustache b/sdks/ruby/templates/configuration.mustache index b020785d3..7a323624b 100644 --- a/sdks/ruby/templates/configuration.mustache +++ b/sdks/ruby/templates/configuration.mustache @@ -57,6 +57,16 @@ module {{moduleName}} # Defines the access token (Bearer) used with OAuth2. attr_accessor :access_token + # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2. + # Overrides the access_token if set + # @return [Proc] + attr_accessor :access_token_getter + + # Set this to return data as binary instead of downloading a temp file. When enabled (set to true) + # HTTP responses with return type `File` will be returned as a stream of binary data. + # Default to false. + attr_accessor :return_binary_data + # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response # details will be logged with `logger.debug` (see the `logger` attribute). # Default to false. @@ -64,6 +74,14 @@ module {{moduleName}} # @return [true, false] attr_accessor :debugging + # Set this to ignore operation servers for the API client. This is useful when you need to + # send requests to a different server than the one specified in the OpenAPI document. + # Will default to the base url defined in the spec but can be overridden by setting + # `scheme`, `host`, `base_path` directly. + # Default to false. + # @return [true, false] + attr_accessor :ignore_operation_servers + # Defines the logger used for debugging. # Default to `Rails.logger` (when in Rails) or logging to STDOUT. # @@ -86,18 +104,15 @@ module {{moduleName}} # @return [true, false] attr_accessor :client_side_validation -{{^isFaraday}} -{{> configuration_tls_typhoeus_partial}} -{{/isFaraday}} +{{#isTyphoeus}} +{{> configuration_typhoeus_partial}} +{{/isTyphoeus}} {{#isFaraday}} -{{> configuration_tls_faraday_partial}} +{{> configuration_faraday_partial}} {{/isFaraday}} - # Set this to customize parameters encoding of array parameter with multi collectionFormat. - # Default to nil. - # - # @see The params_encoding option of Ethon. Related source code: - # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 - attr_accessor :params_encoding +{{#isHttpx}} +{{> configuration_httpx_partial}} +{{/isHttpx}} attr_accessor :inject_format @@ -107,7 +122,7 @@ module {{moduleName}} @scheme = '{{scheme}}' @host = '{{host}}{{#port}}:{{{.}}}{{/port}}' @base_path = '{{contextPath}}' - @server_index = 0 + @server_index = nil @server_operation_index = {} @server_variables = {} @server_operation_variables = {} @@ -120,20 +135,29 @@ module {{moduleName}} @ssl_ca_file = nil @ssl_client_cert = nil @ssl_client_key = nil - @middlewares = [] - @request_middlewares = [] - @response_middlewares = [] + @middlewares = Hash.new { |h, k| h[k] = [] } + @configure_connection_blocks = [] @timeout = 60 + # return data as binary instead of file + @return_binary_data = false + @params_encoder = nil {{/isFaraday}} - {{^isFaraday}} + {{#isTyphoeus}} @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 - {{/isFaraday}} + @params_encoding = nil + {{/isTyphoeus}} + {{#isHttpx}} + @ssl = nil + @proxy = nil + @timeout = 60 + @configure_session_blocks = [] + {{/isHttpx}} @debugging = false + @ignore_operation_servers = false @inject_format = false @force_ending_format = false @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) @@ -168,10 +192,13 @@ module {{moduleName}} # Returns base URL for specified operation based on server settings def base_url(operation = nil) - index = server_operation_index.fetch(operation, server_index) - return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil - - server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers + if operation_server_settings.key?(operation) then + index = server_operation_index.fetch(operation, server_index) + server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + else + server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil) + end end # Gets API key (with prefix if set). @@ -186,6 +213,12 @@ module {{moduleName}} end end + # Gets access_token using access_token_getter or uses the static access_token + def access_token_with_refresh + return access_token if access_token_getter.nil? + access_token_getter.call + end + # Gets Basic Auth token string def basic_auth_token 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") @@ -311,8 +344,8 @@ module {{moduleName}} servers = server_settings if servers == nil # check array index out of bound - if (index < 0 || index >= servers.size) - fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" + if (index.nil? || index < 0 || index >= servers.size) + fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}" end server = servers[index] @@ -338,35 +371,108 @@ module {{moduleName}} end {{#isFaraday}} + # Configure Faraday connection directly. + # + # ``` + # c.configure_faraday_connection do |conn| + # conn.use Faraday::HttpCache, shared_cache: false, logger: logger + # conn.response :logger, nil, headers: true, bodies: true, log_level: :debug do |logger| + # logger.filter(/(Authorization: )(.*)/, '\1[REDACTED]') + # end + # end + # + # c.configure_faraday_connection do |conn| + # conn.adapter :typhoeus + # end + # ``` + # + # @param block [Proc] `#call`able object that takes one arg, the connection + def configure_faraday_connection(&block) + @configure_connection_blocks << block + end + + def configure_connection(conn) + @configure_connection_blocks.each do |block| + block.call(conn) + end + end + # Adds middleware to the stack def use(*middleware) - @middlewares << middleware + set_faraday_middleware(:use, *middleware) end # Adds request middleware to the stack def request(*middleware) - @request_middlewares << middleware + set_faraday_middleware(:request, *middleware) end # Adds response middleware to the stack def response(*middleware) - @response_middlewares << middleware + set_faraday_middleware(:response, *middleware) end + # Adds Faraday middleware setting information to the stack + # + # @example Use the `set_faraday_middleware` method to set middleware information + # config.set_faraday_middleware(:request, :retry, max: 3, methods: [:get, :post], retry_statuses: [503]) + # config.set_faraday_middleware(:response, :logger, nil, { bodies: true, log_level: :debug }) + # config.set_faraday_middleware(:use, Faraday::HttpCache, store: Rails.cache, shared_cache: false) + # config.set_faraday_middleware(:insert, 0, FaradayMiddleware::FollowRedirects, { standards_compliant: true, limit: 1 }) + # config.set_faraday_middleware(:swap, 0, Faraday::Response::Logger) + # config.set_faraday_middleware(:delete, Faraday::Multipart::Middleware) + # + # @see https://github.com/lostisland/faraday/blob/v2.3.0/lib/faraday/rack_builder.rb#L92-L143 + def set_faraday_middleware(operation, key, *args, &block) + unless [:request, :response, :use, :insert, :insert_before, :insert_after, :swap, :delete].include?(operation) + fail ArgumentError, "Invalid faraday middleware operation #{operation}. Must be" \ + " :request, :response, :use, :insert, :insert_before, :insert_after, :swap or :delete." + end + + @middlewares[operation] << [key, args, block] + end + ruby2_keywords(:set_faraday_middleware) if respond_to?(:ruby2_keywords, true) + # Set up middleware on the connection def configure_middleware(connection) - @middlewares.each do |middleware| - connection.use(*middleware) - end + return if @middlewares.empty? + + [:request, :response, :use, :insert, :insert_before, :insert_after, :swap].each do |operation| + next unless @middlewares.key?(operation) - @request_middlewares.each do |middleware| - connection.request(*middleware) + @middlewares[operation].each do |key, args, block| + connection.builder.send(operation, key, *args, &block) + end end - @response_middlewares.each do |middleware| - connection.response(*middleware) + if @middlewares.key?(:delete) + @middlewares[:delete].each do |key, _args, _block| + connection.builder.delete(key) + end end end {{/isFaraday}} + + {{#isHttpx}} + # Configure Httpx session directly. + # + # ``` + # c.configure_session do |http| + # http.plugin(:follow_redirects).with(debug: STDOUT, debug_level: 1) + # end + # ``` + # + # @param block [Proc] `#call`able object that takes one arg, the connection + def configure_session(&block) + @configure_session_blocks << block + end + + + def configure(session) + @configure_session_blocks.reduce(session) do |configured_sess, block| + block.call(configured_sess) + end + end + {{/isHttpx}} end end diff --git a/sdks/ruby/templates/configuration_tls_faraday_partial.mustache b/sdks/ruby/templates/configuration_faraday_partial.mustache similarity index 72% rename from sdks/ruby/templates/configuration_tls_faraday_partial.mustache rename to sdks/ruby/templates/configuration_faraday_partial.mustache index e5f4085cd..83cbf9657 100644 --- a/sdks/ruby/templates/configuration_tls_faraday_partial.mustache +++ b/sdks/ruby/templates/configuration_faraday_partial.mustache @@ -27,3 +27,14 @@ ### TLS/SSL setting # Client private key file (for client certificate) attr_accessor :ssl_client_key + + ### Proxy setting + # HTTP Proxy settings + attr_accessor :proxy + + # Set this to customize parameters encoder of array parameter. + # Default to nil. Faraday uses NestedParamsEncoder when nil. + # + # @see The params_encoder option of Faraday. Related source code: + # https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders + attr_accessor :params_encoder diff --git a/sdks/ruby/templates/configuration_httpx_partial.mustache b/sdks/ruby/templates/configuration_httpx_partial.mustache new file mode 100644 index 000000000..807a30da7 --- /dev/null +++ b/sdks/ruby/templates/configuration_httpx_partial.mustache @@ -0,0 +1,11 @@ + ### TLS/SSL setting + # You can use this to customize SSL Context settings (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html + # to know which ones). + # + # @return [Hash{Symbol => Object}, OpenSSL::SSL::SSLContext, nil] + attr_accessor :ssl + + ### Proxy setting + # HTTP Proxy settings (see https://honeyryderchuck.gitlab.io/httpx/wiki/Proxy#options) + # @return [Hash{Symbol => Object}, nil] + attr_accessor :proxy diff --git a/sdks/ruby/templates/configuration_tls_typhoeus_partial.mustache b/sdks/ruby/templates/configuration_typhoeus_partial.mustache similarity index 79% rename from sdks/ruby/templates/configuration_tls_typhoeus_partial.mustache rename to sdks/ruby/templates/configuration_typhoeus_partial.mustache index b75954c25..b117e2030 100644 --- a/sdks/ruby/templates/configuration_tls_typhoeus_partial.mustache +++ b/sdks/ruby/templates/configuration_typhoeus_partial.mustache @@ -32,3 +32,10 @@ ### TLS/SSL setting # Client private key file (for client certificate) attr_accessor :key_file + + # Set this to customize parameters encoding of array parameter with multi collectionFormat. + # Default to nil. + # + # @see The params_encoding option of Ethon. Related source code: + # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 + attr_accessor :params_encoding diff --git a/sdks/ruby/templates/gem.mustache b/sdks/ruby/templates/gem.mustache index 958fbffdb..9b5e31384 100644 --- a/sdks/ruby/templates/gem.mustache +++ b/sdks/ruby/templates/gem.mustache @@ -9,6 +9,7 @@ require '{{gemName}}/version' require '{{gemName}}/configuration' # Models +{{^useAutoload}} {{#models}} {{#model}} {{^parent}} @@ -23,11 +24,24 @@ require '{{gemName}}/{{modelPackage}}/{{classFilename}}' {{/parent}} {{/model}} {{/models}} +{{/useAutoload}} +{{#useAutoload}} +{{#models}} +{{#model}} +{{moduleName}}.autoload :{{classname}}, '{{gemName}}/{{modelPackage}}/{{classFilename}}' +{{/model}} +{{/models}} +{{/useAutoload}} # APIs {{#apiInfo}} {{#apis}} +{{^useAutoload}} require '{{importPath}}' +{{/useAutoload}} +{{#useAutoload}} +{{moduleName}}.autoload :{{classname}}, '{{importPath}}' +{{/useAutoload}} {{/apis}} {{/apiInfo}} diff --git a/sdks/ruby/templates/gemspec.mustache b/sdks/ruby/templates/gemspec.mustache index ea84291d4..ea1cf2f77 100644 --- a/sdks/ruby/templates/gemspec.mustache +++ b/sdks/ruby/templates/gemspec.mustache @@ -17,14 +17,20 @@ Gem::Specification.new do |s| s.summary = "{{gemSummary}}{{^gemSummary}}{{{appName}}} Ruby Gem{{/gemSummary}}" s.description = "{{gemDescription}}{{^gemDescription}}{{{appDescription}}}{{^appDescription}}{{{appName}}} Ruby Gem{{/appDescription}}{{/gemDescription}}" s.license = "{{{gemLicense}}}{{^gemLicense}}Unlicense{{/gemLicense}}" - s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.4{{/gemRequiredRubyVersion}}" + s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.7{{/gemRequiredRubyVersion}}" + s.metadata = {{{gemMetadata}}}{{^gemMetadata}}{}{{/gemMetadata}} {{#isFaraday}} - s.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1' + s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0' + s.add_runtime_dependency 'faraday-multipart' + s.add_runtime_dependency 'marcel' {{/isFaraday}} - {{^isFaraday}} + {{#isTyphoeus}} s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' - {{/isFaraday}} + {{/isTyphoeus}} + {{#isHttpx}} + s.add_runtime_dependency 'httpx', '~> 1.0', '>= 1.0.0' + {{/isHttpx}} s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' diff --git a/sdks/ruby/templates/model_test.mustache b/sdks/ruby/templates/model_test.mustache index 86e5438d6..b6b078da5 100644 --- a/sdks/ruby/templates/model_test.mustache +++ b/sdks/ruby/templates/model_test.mustache @@ -24,14 +24,14 @@ describe {{moduleName}}::{{classname}} do describe 'test attribute "{{{name}}}"' do it 'should work' do {{#isEnum}} - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ # validator = Petstore::EnumTest::EnumAttributeValidator.new('{{{dataType}}}', [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]) # validator.allowable_values.each do |value| # expect { instance.{{name}} = value }.not_to raise_error # end {{/isEnum}} {{^isEnum}} - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ {{/isEnum}} end end @@ -68,6 +68,7 @@ describe {{moduleName}}::{{classname}} do {{/discriminator}} describe '.build' do it 'returns the correct model' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end {{/-first}} diff --git a/sdks/ruby/templates/partial_model_enum_class.mustache b/sdks/ruby/templates/partial_model_enum_class.mustache index 4b8b5a0ff..3880ae8b5 100644 --- a/sdks/ruby/templates/partial_model_enum_class.mustache +++ b/sdks/ruby/templates/partial_model_enum_class.mustache @@ -2,6 +2,10 @@ {{{name}}} = {{{value}}}.freeze{{/enumVars}} {{/allowableValues}} + def self.all_vars + @all_vars ||= [{{#allowableValues}}{{#enumVars}}{{{name}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -13,8 +17,7 @@ # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = {{classname}}.constants.select { |c| {{classname}}::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #{{{classname}}}" if constantValues.empty? - value + return value if {{classname}}.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #{{{classname}}}" end - end \ No newline at end of file + end diff --git a/sdks/ruby/templates/partial_model_generic.mustache b/sdks/ruby/templates/partial_model_generic.mustache index 87998bb9e..497a3d3aa 100644 --- a/sdks/ruby/templates/partial_model_generic.mustache +++ b/sdks/ruby/templates/partial_model_generic.mustache @@ -343,44 +343,44 @@ {{/required}} {{/isNullable}} {{#maxLength}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.to_s.length > {{{maxLength}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.to_s.length > {{{maxLength}}} fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be smaller than or equal to {{{maxLength}}}.' end {{/maxLength}} {{#minLength}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.to_s.length < {{{minLength}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.to_s.length < {{{minLength}}} fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be great than or equal to {{{minLength}}}.' end {{/minLength}} {{#maximum}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{{maximum}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{{maximum}}} fail ArgumentError, 'invalid value for "{{{name}}}", must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{{maximum}}}.' end {{/maximum}} {{#minimum}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{{minimum}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{{minimum}}} fail ArgumentError, 'invalid value for "{{{name}}}", must be greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{{minimum}}}.' end {{/minimum}} {{#pattern}} pattern = Regexp.new({{{pattern}}}) - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} !~ pattern + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}} !~ pattern fail ArgumentError, "invalid value for \"{{{name}}}\", must conform to the pattern #{pattern}." end {{/pattern}} {{#maxItems}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.length > {{{maxItems}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.length > {{{maxItems}}} fail ArgumentError, 'invalid value for "{{{name}}}", number of items must be less than or equal to {{{maxItems}}}.' end {{/maxItems}} {{#minItems}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.length < {{{minItems}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.length < {{{minItems}}} fail ArgumentError, 'invalid value for "{{{name}}}", number of items must be greater than or equal to {{{minItems}}}.' end diff --git a/sdks/ruby/templates/partial_oneof_module.mustache b/sdks/ruby/templates/partial_oneof_module.mustache index 50655f429..d3a25f69e 100644 --- a/sdks/ruby/templates/partial_oneof_module.mustache +++ b/sdks/ruby/templates/partial_oneof_module.mustache @@ -44,11 +44,11 @@ def build(data) {{#discriminator}} discriminator_value = data[openapi_discriminator_name] - return nil unless discriminator_value + return nil if discriminator_value.nil? {{#mappedModels}} {{#-first}} - klass = openapi_discriminator_mapping[discriminator_value.to_sym] + klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym] return nil unless klass {{moduleName}}.const_get(klass).build_from_hash(data) @@ -121,9 +121,9 @@ return model if model else # raise if data contains keys that are not known to the model - raise unless (data.keys - const.acceptable_attributes).empty? + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? model = const.build_from_hash(data) - return model if model && model.valid? + return model if model end end end diff --git a/sdks/ruby/templates/partial_oneof_module_doc.mustache b/sdks/ruby/templates/partial_oneof_module_doc.mustache index 64a6c32dc..f86cefe92 100644 --- a/sdks/ruby/templates/partial_oneof_module_doc.mustache +++ b/sdks/ruby/templates/partial_oneof_module_doc.mustache @@ -60,6 +60,7 @@ require '{{{gemName}}}' # } {{/-last}} {{/mappedModels}} +``` {{/discriminator}} ### build diff --git a/sdks/ruby/templates/travis.mustache b/sdks/ruby/templates/travis.mustache index 0d1ed3815..ed7f55c38 100644 --- a/sdks/ruby/templates/travis.mustache +++ b/sdks/ruby/templates/travis.mustache @@ -1,12 +1,9 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec diff --git a/translations/en.yaml b/translations/en.yaml index ec4c250b0..2e8cd816a 100644 --- a/translations/en.yaml +++ b/translations/en.yaml @@ -1152,11 +1152,14 @@ "Account::TEAM_ID": The id of the team account belongs to. "Account::LOCALE": The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. "Account::QUOTA": Details concerning remaining monthly quotas. +"Account::USAGE": Details concerning monthly usage "AccountQuota::TEMPLATES_LEFT": API templates remaining. "AccountQuota::TEMPLATES_TOTAL": Total API templates allowed. "AccountQuota::API_SIGNATURE_REQUESTS_LEFT": API signature requests remaining. "AccountQuota::DOCUMENTS_LEFT": Signature requests remaining. "AccountQuota::SMS_VERIFICATIONS_LEFT": SMS verifications remaining. +"AccountQuota::NUM_FAX_PAGES_LEFT": Number of fax pages left +"AccountUsage::FAX_PAGES_SENT": Number of fax pages sent "ApiAppCreateResponseExample::SUMMARY": API App "ApiAppGetResponseExample::SUMMARY": API App