diff --git a/app/graphql/types/payment_requests/object.rb b/app/graphql/types/payment_requests/object.rb index 4b86542ef66..30819d4652c 100644 --- a/app/graphql/types/payment_requests/object.rb +++ b/app/graphql/types/payment_requests/object.rb @@ -11,6 +11,7 @@ class Object < Types::BaseObject field :amount_currency, Types::CurrencyEnum, null: false field :created_at, GraphQL::Types::ISO8601DateTime, null: false field :email, String, null: false + field :payment_status, Types::Invoices::PaymentStatusTypeEnum, null: false field :updated_at, GraphQL::Types::ISO8601DateTime, null: false field :customer, Types::Customers::Object, null: false diff --git a/schema.graphql b/schema.graphql index 99228d5501b..6f520ae3545 100644 --- a/schema.graphql +++ b/schema.graphql @@ -5504,6 +5504,7 @@ type PaymentRequest { email: String! id: ID! invoices: [Invoice!]! + paymentStatus: InvoicePaymentStatusTypeEnum! updatedAt: ISO8601DateTime! } diff --git a/schema.json b/schema.json index 7ae055cdcd7..f22d923765d 100644 --- a/schema.json +++ b/schema.json @@ -25505,6 +25505,24 @@ ] }, + { + "name": "paymentStatus", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "InvoicePaymentStatusTypeEnum", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null, + "args": [ + + ] + }, { "name": "updatedAt", "description": null, diff --git a/spec/graphql/types/payment_requests/object_spec.rb b/spec/graphql/types/payment_requests/object_spec.rb new file mode 100644 index 00000000000..44859b40cbd --- /dev/null +++ b/spec/graphql/types/payment_requests/object_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require "rails_helper" + +RSpec.describe Types::PaymentRequests::Object do + subject { described_class } + + it { is_expected.to have_field(:customer).of_type("Customer!") } + it { is_expected.to have_field(:invoices).of_type("[Invoice!]!") } + + it { is_expected.to have_field(:id).of_type("ID!") } + it { is_expected.to have_field(:amount_cents).of_type("BigInt!") } + it { is_expected.to have_field(:amount_currency).of_type("CurrencyEnum!") } + it { is_expected.to have_field(:email).of_type("String!") } + it { is_expected.to have_field(:payment_status).of_type("InvoicePaymentStatusTypeEnum!") } + + it { is_expected.to have_field(:created_at).of_type("ISO8601DateTime!") } + it { is_expected.to have_field(:updated_at).of_type("ISO8601DateTime!") } +end