moov_ruby 0.3.22 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/moov/client.rb +2 -1
- data/lib/moov/invoices.rb +288 -0
- data/lib/moov/models/components/createinvoice.rb +6 -6
- data/lib/moov/models/components/createinvoice.rbi +2 -2
- data/lib/moov/models/components/createinvoicepayment.rb +45 -0
- data/lib/moov/models/components/createinvoicepayment.rbi +19 -0
- data/lib/moov/models/components/createruntransfer.rb +58 -0
- data/lib/moov/models/components/createruntransfer.rbi +25 -0
- data/lib/moov/models/components/createscheduledtransferlineitem.rb +53 -0
- data/lib/moov/models/components/createscheduledtransferlineitem.rbi +23 -0
- data/lib/moov/models/components/createscheduledtransferlineitemoption.rb +49 -0
- data/lib/moov/models/components/createscheduledtransferlineitemoption.rbi +21 -0
- data/lib/moov/models/components/createscheduledtransferlineitems.rb +34 -0
- data/lib/moov/models/components/createscheduledtransferlineitems.rbi +13 -0
- data/lib/moov/models/components/createwebhook.rb +45 -0
- data/lib/moov/models/components/createwebhook.rbi +19 -0
- data/lib/moov/models/components/eventtype.rb +41 -0
- data/lib/moov/models/components/eventtype.rbi +17 -0
- data/lib/moov/models/components/incurredfee.rb +6 -2
- data/lib/moov/models/components/incurredfee.rbi +2 -0
- data/lib/moov/models/components/invoice.rb +9 -9
- data/lib/moov/models/components/invoice.rbi +4 -4
- data/lib/moov/models/components/invoiceexternalpayment.rb +3 -11
- data/lib/moov/models/components/invoiceexternalpayment.rbi +0 -4
- data/lib/moov/models/components/invoicepayment.rb +13 -5
- data/lib/moov/models/components/invoicepayment.rbi +6 -2
- data/lib/moov/models/components/invoicetransferpayment.rb +2 -6
- data/lib/moov/models/components/invoicetransferpayment.rbi +0 -2
- data/lib/moov/models/components/occurrence.rb +2 -2
- data/lib/moov/models/components/occurrencesresponse.rb +1 -1
- data/lib/moov/models/components/pingresponse.rb +41 -0
- data/lib/moov/models/components/pingresponse.rbi +17 -0
- data/lib/moov/models/components/recur.rb +2 -2
- data/lib/moov/models/components/recurresponse.rb +46 -0
- data/lib/moov/models/components/recurresponse.rbi +19 -0
- data/lib/moov/models/components/runtransfer.rb +2 -3
- data/lib/moov/models/components/scheduledtransferimagemetadata.rb +45 -0
- data/lib/moov/models/components/scheduledtransferimagemetadata.rbi +19 -0
- data/lib/moov/models/components/scheduledtransferlineitem.rb +6 -2
- data/lib/moov/models/components/scheduledtransferlineitem.rbi +2 -0
- data/lib/moov/models/components/scheduledtransferlineitemoption.rb +6 -2
- data/lib/moov/models/components/scheduledtransferlineitemoption.rbi +2 -0
- data/lib/moov/models/components/scheduledtransferlineitems.rb +1 -2
- data/lib/moov/models/components/schedulelistresponse.rb +3 -3
- data/lib/moov/models/components/scheduleresponse.rb +3 -3
- data/lib/moov/models/components/updatewebhook.rb +45 -0
- data/lib/moov/models/components/updatewebhook.rbi +19 -0
- data/lib/moov/models/components/webhook.rb +61 -0
- data/lib/moov/models/components/webhook.rbi +27 -0
- data/lib/moov/models/components/webhooksecret.rb +33 -0
- data/lib/moov/models/components/webhooksecret.rbi +13 -0
- data/lib/moov/models/components/{invoiceexternalpayment_paymenttype.rb → webhookstatus.rb} +4 -3
- data/lib/moov/models/components/webhookstatus.rbi +11 -0
- data/lib/moov/models/components.rb +14 -2
- data/lib/moov/models/errors/createinvoicepaymenterror.rb +49 -0
- data/lib/moov/models/errors/createinvoicepaymenterror.rbi +21 -0
- data/lib/moov/models/errors/createwebhookvalidationerror.rb +49 -0
- data/lib/moov/models/errors/createwebhookvalidationerror.rbi +21 -0
- data/lib/moov/models/errors/updatewebhookvalidationerror.rb +49 -0
- data/lib/moov/models/errors/updatewebhookvalidationerror.rbi +21 -0
- data/lib/moov/models/errors.rb +3 -0
- data/lib/moov/models/operations/createinvoicepayment_request.rb +54 -0
- data/lib/moov/models/operations/createinvoicepayment_request.rbi +19 -0
- data/lib/moov/models/operations/createinvoicepayment_response.rb +49 -0
- data/lib/moov/models/operations/createinvoicepayment_response.rbi +21 -0
- data/lib/moov/models/operations/createwebhook_request.rb +46 -0
- data/lib/moov/models/operations/createwebhook_request.rbi +15 -0
- data/lib/moov/models/operations/createwebhook_response.rb +49 -0
- data/lib/moov/models/operations/createwebhook_response.rbi +21 -0
- data/lib/moov/models/operations/disablewebhook_request.rb +46 -0
- data/lib/moov/models/operations/disablewebhook_request.rbi +15 -0
- data/lib/moov/models/operations/disablewebhook_response.rb +45 -0
- data/lib/moov/models/operations/disablewebhook_response.rbi +19 -0
- data/lib/moov/models/operations/getwebhook_request.rb +46 -0
- data/lib/moov/models/operations/getwebhook_request.rbi +15 -0
- data/lib/moov/models/operations/getwebhook_response.rb +49 -0
- data/lib/moov/models/operations/getwebhook_response.rbi +21 -0
- data/lib/moov/models/operations/getwebhooksecret_request.rb +46 -0
- data/lib/moov/models/operations/getwebhooksecret_request.rbi +15 -0
- data/lib/moov/models/operations/getwebhooksecret_response.rb +49 -0
- data/lib/moov/models/operations/getwebhooksecret_response.rbi +21 -0
- data/lib/moov/models/operations/listeventtypes_request.rb +42 -0
- data/lib/moov/models/operations/listeventtypes_request.rbi +13 -0
- data/lib/moov/models/operations/listeventtypes_response.rb +49 -0
- data/lib/moov/models/operations/listeventtypes_response.rbi +21 -0
- data/lib/moov/models/operations/listfeerevenue_request.rb +14 -2
- data/lib/moov/models/operations/listfeerevenue_request.rbi +6 -0
- data/lib/moov/models/operations/listinvoicepayments_request.rb +50 -0
- data/lib/moov/models/operations/listinvoicepayments_request.rbi +17 -0
- data/lib/moov/models/operations/listinvoicepayments_response.rb +49 -0
- data/lib/moov/models/operations/listinvoicepayments_response.rbi +21 -0
- data/lib/moov/models/operations/listwebhooks_request.rb +42 -0
- data/lib/moov/models/operations/listwebhooks_request.rbi +13 -0
- data/lib/moov/models/operations/listwebhooks_response.rb +49 -0
- data/lib/moov/models/operations/listwebhooks_response.rbi +21 -0
- data/lib/moov/models/operations/pingwebhook_request.rb +46 -0
- data/lib/moov/models/operations/pingwebhook_request.rbi +15 -0
- data/lib/moov/models/operations/pingwebhook_response.rb +49 -0
- data/lib/moov/models/operations/pingwebhook_response.rbi +21 -0
- data/lib/moov/models/operations/retrievefees_request.rb +6 -2
- data/lib/moov/models/operations/retrievefees_request.rbi +2 -0
- data/lib/moov/models/operations/updatewebhook_request.rb +50 -0
- data/lib/moov/models/operations/updatewebhook_request.rbi +17 -0
- data/lib/moov/models/operations/updatewebhook_response.rb +49 -0
- data/lib/moov/models/operations/updatewebhook_response.rbi +21 -0
- data/lib/moov/models/operations.rb +20 -0
- data/lib/moov/sdkconfiguration.rb +2 -2
- data/lib/moov/webhooks.rb +1056 -0
- data/lib/moov_ruby.rb +1 -0
- metadata +77 -6
- data/lib/moov/models/components/invoiceexternalpayment_paymenttype.rbi +0 -11
- data/lib/moov/models/components/invoicetransferpayment_paymenttype.rb +0 -21
- data/lib/moov/models/components/invoicetransferpayment_paymenttype.rbi +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c892035311209655ef6c827e9b64a12a26a12020336d1ddfa0f91eabe093287
|
|
4
|
+
data.tar.gz: 0421aae6bbba0bb71c28239bdfd466c92c0e4fa63f0c8526e54d3f00d3005673
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2c0c1cb7f8238eed9ffe5c6dd86bdfd5db34230b79b9ba13b1af558b55874f7aa96d361d39db86d74c5113217de037b747b77540c918a945798b80a387eb501
|
|
7
|
+
data.tar.gz: 75c39dc18132b4943b4a8bc5fb5f7bed8af798ed48cc663ee95cb2cf4bc9cd054357c05f282343c7f3e6ee70fe6ad48950e7e966808f906eee7ddeec66bb4560
|
data/lib/moov/client.rb
CHANGED
|
@@ -16,7 +16,7 @@ module Moov
|
|
|
16
16
|
class Client
|
|
17
17
|
extend T::Sig
|
|
18
18
|
|
|
19
|
-
attr_accessor :accounts, :adjustments, :apple_pay, :bank_accounts, :branding, :capabilities, :cards, :disputes, :fee_plans, :files, :images, :invoices, :payment_links, :payment_methods, :products, :representatives, :scheduling, :statements, :sweeps, :account_terminal_applications, :support, :transfers, :underwriting, :wallets, :wallet_transactions, :avatars, :end_to_end_encryption, :enriched_address, :enriched_profile, :industries, :institutions, :issuing_transactions, :card_issuing, :authentication, :onboarding, :ping, :receipts, :terminal_applications
|
|
19
|
+
attr_accessor :accounts, :adjustments, :apple_pay, :bank_accounts, :branding, :capabilities, :cards, :disputes, :fee_plans, :files, :images, :invoices, :payment_links, :payment_methods, :products, :representatives, :scheduling, :statements, :sweeps, :account_terminal_applications, :support, :transfers, :underwriting, :wallets, :wallet_transactions, :avatars, :end_to_end_encryption, :enriched_address, :enriched_profile, :webhooks, :industries, :institutions, :issuing_transactions, :card_issuing, :authentication, :onboarding, :ping, :receipts, :terminal_applications
|
|
20
20
|
|
|
21
21
|
# Instantiates the SDK, configuring it with the provided parameters.
|
|
22
22
|
#
|
|
@@ -122,6 +122,7 @@ module Moov
|
|
|
122
122
|
@end_to_end_encryption = EndToEndEncryption.new(@sdk_configuration)
|
|
123
123
|
@enriched_address = EnrichedAddress.new(@sdk_configuration)
|
|
124
124
|
@enriched_profile = EnrichedProfile.new(@sdk_configuration)
|
|
125
|
+
@webhooks = Webhooks.new(@sdk_configuration)
|
|
125
126
|
@industries = Industries.new(@sdk_configuration)
|
|
126
127
|
@institutions = Institutions.new(@sdk_configuration)
|
|
127
128
|
@issuing_transactions = IssuingTransactions.new(@sdk_configuration)
|
data/lib/moov/invoices.rb
CHANGED
|
@@ -622,5 +622,293 @@ module Moov
|
|
|
622
622
|
|
|
623
623
|
end
|
|
624
624
|
end
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
sig { params(create_invoice_payment: Models::Components::CreateInvoicePayment, account_id: ::String, invoice_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateInvoicePaymentResponse) }
|
|
628
|
+
def create_invoice_payment(create_invoice_payment:, account_id:, invoice_id:, x_moov_version: nil, timeout_ms: nil)
|
|
629
|
+
# create_invoice_payment - Creates a payment resource to represent that an invoice was paid outside of the Moov platform.
|
|
630
|
+
# If a payment link was created for the invoice, the corresponding payment link is canceled, but a receipt is still sent.
|
|
631
|
+
#
|
|
632
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
633
|
+
# you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
|
|
634
|
+
request = Models::Operations::CreateInvoicePaymentRequest.new(
|
|
635
|
+
account_id: account_id,
|
|
636
|
+
invoice_id: invoice_id,
|
|
637
|
+
create_invoice_payment: create_invoice_payment,
|
|
638
|
+
x_moov_version: x_moov_version
|
|
639
|
+
)
|
|
640
|
+
url, params = @sdk_configuration.get_server_details
|
|
641
|
+
base_url = Utils.template_url(url, params)
|
|
642
|
+
url = Utils.generate_url(
|
|
643
|
+
Models::Operations::CreateInvoicePaymentRequest,
|
|
644
|
+
base_url,
|
|
645
|
+
'/accounts/{accountID}/invoices/{invoiceID}/payments',
|
|
646
|
+
request,
|
|
647
|
+
@sdk_configuration.globals
|
|
648
|
+
)
|
|
649
|
+
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
|
650
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
651
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :create_invoice_payment, :json)
|
|
652
|
+
headers['content-type'] = req_content_type
|
|
653
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
654
|
+
|
|
655
|
+
if form
|
|
656
|
+
body = Utils.encode_form(form)
|
|
657
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
658
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
659
|
+
else
|
|
660
|
+
body = data
|
|
661
|
+
end
|
|
662
|
+
headers['Accept'] = 'application/json'
|
|
663
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
664
|
+
|
|
665
|
+
security = @sdk_configuration.security_source&.call
|
|
666
|
+
|
|
667
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
668
|
+
timeout ||= @sdk_configuration.timeout
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
connection = @sdk_configuration.client
|
|
672
|
+
|
|
673
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
674
|
+
config: @sdk_configuration,
|
|
675
|
+
base_url: base_url,
|
|
676
|
+
oauth2_scopes: nil,
|
|
677
|
+
operation_id: 'createInvoicePayment',
|
|
678
|
+
security_source: @sdk_configuration.security_source
|
|
679
|
+
)
|
|
680
|
+
|
|
681
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
682
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
begin
|
|
686
|
+
http_response = T.must(connection).post(url) do |req|
|
|
687
|
+
req.body = body
|
|
688
|
+
req.headers.merge!(headers)
|
|
689
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
690
|
+
Utils.configure_request_security(req, security)
|
|
691
|
+
|
|
692
|
+
@sdk_configuration.hooks.before_request(
|
|
693
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
694
|
+
hook_ctx: hook_ctx
|
|
695
|
+
),
|
|
696
|
+
request: req
|
|
697
|
+
)
|
|
698
|
+
end
|
|
699
|
+
rescue StandardError => e
|
|
700
|
+
error = e
|
|
701
|
+
ensure
|
|
702
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
703
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
704
|
+
error: error,
|
|
705
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
706
|
+
hook_ctx: hook_ctx
|
|
707
|
+
),
|
|
708
|
+
response: http_response
|
|
709
|
+
)
|
|
710
|
+
else
|
|
711
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
712
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
713
|
+
hook_ctx: hook_ctx
|
|
714
|
+
),
|
|
715
|
+
response: http_response
|
|
716
|
+
)
|
|
717
|
+
end
|
|
718
|
+
|
|
719
|
+
if http_response.nil?
|
|
720
|
+
raise error if !error.nil?
|
|
721
|
+
raise 'no response'
|
|
722
|
+
end
|
|
723
|
+
end
|
|
724
|
+
|
|
725
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
726
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
727
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
728
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
729
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
730
|
+
hook_ctx: hook_ctx
|
|
731
|
+
),
|
|
732
|
+
response: http_response
|
|
733
|
+
)
|
|
734
|
+
response_data = http_response.env.response_body
|
|
735
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::InvoicePayment)
|
|
736
|
+
response = Models::Operations::CreateInvoicePaymentResponse.new(
|
|
737
|
+
status_code: http_response.status,
|
|
738
|
+
content_type: content_type,
|
|
739
|
+
raw_response: http_response,
|
|
740
|
+
headers: http_response.headers,
|
|
741
|
+
invoice_payment: T.unsafe(obj)
|
|
742
|
+
)
|
|
743
|
+
|
|
744
|
+
return response
|
|
745
|
+
else
|
|
746
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
747
|
+
end
|
|
748
|
+
elsif Utils.match_status_code(http_response.status, ['400', '409'])
|
|
749
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
750
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
751
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
752
|
+
hook_ctx: hook_ctx
|
|
753
|
+
),
|
|
754
|
+
response: http_response
|
|
755
|
+
)
|
|
756
|
+
response_data = http_response.env.response_body
|
|
757
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
|
758
|
+
obj.raw_response = http_response
|
|
759
|
+
raise obj
|
|
760
|
+
else
|
|
761
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
762
|
+
end
|
|
763
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
|
764
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
765
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
766
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
767
|
+
hook_ctx: hook_ctx
|
|
768
|
+
),
|
|
769
|
+
response: http_response
|
|
770
|
+
)
|
|
771
|
+
response_data = http_response.env.response_body
|
|
772
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::CreateInvoicePaymentError)
|
|
773
|
+
obj.raw_response = http_response
|
|
774
|
+
raise obj
|
|
775
|
+
else
|
|
776
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
777
|
+
end
|
|
778
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '404', '429'])
|
|
779
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
780
|
+
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
|
781
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
782
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
783
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
784
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
785
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
786
|
+
else
|
|
787
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
788
|
+
|
|
789
|
+
end
|
|
790
|
+
end
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
sig { params(account_id: ::String, invoice_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListInvoicePaymentsResponse) }
|
|
794
|
+
def list_invoice_payments(account_id:, invoice_id:, x_moov_version: nil, timeout_ms: nil)
|
|
795
|
+
# list_invoice_payments - List all the payments made towards an invoice.
|
|
796
|
+
#
|
|
797
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
798
|
+
# you'll need to specify the `/accounts/{accountID}/invoices.read` scope.
|
|
799
|
+
request = Models::Operations::ListInvoicePaymentsRequest.new(
|
|
800
|
+
account_id: account_id,
|
|
801
|
+
invoice_id: invoice_id,
|
|
802
|
+
x_moov_version: x_moov_version
|
|
803
|
+
)
|
|
804
|
+
url, params = @sdk_configuration.get_server_details
|
|
805
|
+
base_url = Utils.template_url(url, params)
|
|
806
|
+
url = Utils.generate_url(
|
|
807
|
+
Models::Operations::ListInvoicePaymentsRequest,
|
|
808
|
+
base_url,
|
|
809
|
+
'/accounts/{accountID}/invoices/{invoiceID}/payments',
|
|
810
|
+
request,
|
|
811
|
+
@sdk_configuration.globals
|
|
812
|
+
)
|
|
813
|
+
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
|
814
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
815
|
+
headers['Accept'] = 'application/json'
|
|
816
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
817
|
+
|
|
818
|
+
security = @sdk_configuration.security_source&.call
|
|
819
|
+
|
|
820
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
821
|
+
timeout ||= @sdk_configuration.timeout
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
connection = @sdk_configuration.client
|
|
825
|
+
|
|
826
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
827
|
+
config: @sdk_configuration,
|
|
828
|
+
base_url: base_url,
|
|
829
|
+
oauth2_scopes: nil,
|
|
830
|
+
operation_id: 'listInvoicePayments',
|
|
831
|
+
security_source: @sdk_configuration.security_source
|
|
832
|
+
)
|
|
833
|
+
|
|
834
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
835
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
begin
|
|
839
|
+
http_response = T.must(connection).get(url) do |req|
|
|
840
|
+
req.headers.merge!(headers)
|
|
841
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
842
|
+
Utils.configure_request_security(req, security)
|
|
843
|
+
|
|
844
|
+
@sdk_configuration.hooks.before_request(
|
|
845
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
846
|
+
hook_ctx: hook_ctx
|
|
847
|
+
),
|
|
848
|
+
request: req
|
|
849
|
+
)
|
|
850
|
+
end
|
|
851
|
+
rescue StandardError => e
|
|
852
|
+
error = e
|
|
853
|
+
ensure
|
|
854
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
855
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
856
|
+
error: error,
|
|
857
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
858
|
+
hook_ctx: hook_ctx
|
|
859
|
+
),
|
|
860
|
+
response: http_response
|
|
861
|
+
)
|
|
862
|
+
else
|
|
863
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
864
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
865
|
+
hook_ctx: hook_ctx
|
|
866
|
+
),
|
|
867
|
+
response: http_response
|
|
868
|
+
)
|
|
869
|
+
end
|
|
870
|
+
|
|
871
|
+
if http_response.nil?
|
|
872
|
+
raise error if !error.nil?
|
|
873
|
+
raise 'no response'
|
|
874
|
+
end
|
|
875
|
+
end
|
|
876
|
+
|
|
877
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
878
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
879
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
880
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
881
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
882
|
+
hook_ctx: hook_ctx
|
|
883
|
+
),
|
|
884
|
+
response: http_response
|
|
885
|
+
)
|
|
886
|
+
response_data = http_response.env.response_body
|
|
887
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Array.new(Models::Components::InvoicePayment))
|
|
888
|
+
response = Models::Operations::ListInvoicePaymentsResponse.new(
|
|
889
|
+
status_code: http_response.status,
|
|
890
|
+
content_type: content_type,
|
|
891
|
+
raw_response: http_response,
|
|
892
|
+
headers: http_response.headers,
|
|
893
|
+
invoice_payments: T.unsafe(obj)
|
|
894
|
+
)
|
|
895
|
+
|
|
896
|
+
return response
|
|
897
|
+
else
|
|
898
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
899
|
+
end
|
|
900
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '429'])
|
|
901
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
902
|
+
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
|
903
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
904
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
905
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
906
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
907
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
908
|
+
else
|
|
909
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
910
|
+
|
|
911
|
+
end
|
|
912
|
+
end
|
|
625
913
|
end
|
|
626
914
|
end
|
|
@@ -15,22 +15,22 @@ module Moov
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
field :customer_account_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('customerAccountID'), required: true } }
|
|
18
|
-
|
|
19
|
-
field :description, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description'), required: true } }
|
|
20
18
|
# A collection of line items for an invoice.
|
|
21
19
|
field :line_items, Models::Components::CreateInvoiceLineItems, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems'), required: true } }
|
|
22
20
|
|
|
21
|
+
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
|
22
|
+
|
|
23
23
|
field :invoice_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('invoiceDate'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
|
24
24
|
|
|
25
25
|
field :due_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('dueDate'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
|
26
26
|
|
|
27
27
|
field :tax_amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('taxAmount') } }
|
|
28
28
|
|
|
29
|
-
sig { params(customer_account_id: ::String,
|
|
30
|
-
def initialize(customer_account_id:,
|
|
29
|
+
sig { params(customer_account_id: ::String, line_items: Models::Components::CreateInvoiceLineItems, description: T.nilable(::String), invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime), tax_amount: T.nilable(Models::Components::AmountDecimal)).void }
|
|
30
|
+
def initialize(customer_account_id:, line_items:, description: nil, invoice_date: nil, due_date: nil, tax_amount: nil)
|
|
31
31
|
@customer_account_id = customer_account_id
|
|
32
|
-
@description = description
|
|
33
32
|
@line_items = line_items
|
|
33
|
+
@description = description
|
|
34
34
|
@invoice_date = invoice_date
|
|
35
35
|
@due_date = due_date
|
|
36
36
|
@tax_amount = tax_amount
|
|
@@ -40,8 +40,8 @@ module Moov
|
|
|
40
40
|
def ==(other)
|
|
41
41
|
return false unless other.is_a? self.class
|
|
42
42
|
return false unless @customer_account_id == other.customer_account_id
|
|
43
|
-
return false unless @description == other.description
|
|
44
43
|
return false unless @line_items == other.line_items
|
|
44
|
+
return false unless @description == other.description
|
|
45
45
|
return false unless @invoice_date == other.invoice_date
|
|
46
46
|
return false unless @due_date == other.due_date
|
|
47
47
|
return false unless @tax_amount == other.tax_amount
|
|
@@ -10,10 +10,10 @@ end
|
|
|
10
10
|
class Moov::Models::Components::CreateInvoice
|
|
11
11
|
def customer_account_id(); end
|
|
12
12
|
def customer_account_id=(str_); end
|
|
13
|
-
def description(); end
|
|
14
|
-
def description=(str_); end
|
|
15
13
|
def line_items(); end
|
|
16
14
|
def line_items=(str_); end
|
|
15
|
+
def description(); end
|
|
16
|
+
def description=(str_); end
|
|
17
17
|
def invoice_date(); end
|
|
18
18
|
def invoice_date=(str_); end
|
|
19
19
|
def due_date(); end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Moov
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CreateInvoicePayment
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
field :amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
18
|
+
|
|
19
|
+
field :foreign_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('foreignID') } }
|
|
20
|
+
|
|
21
|
+
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
|
22
|
+
|
|
23
|
+
field :payment_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentDate'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
|
24
|
+
|
|
25
|
+
sig { params(amount: Models::Components::AmountDecimal, foreign_id: T.nilable(::String), description: T.nilable(::String), payment_date: T.nilable(::DateTime)).void }
|
|
26
|
+
def initialize(amount:, foreign_id: nil, description: nil, payment_date: nil)
|
|
27
|
+
@amount = amount
|
|
28
|
+
@foreign_id = foreign_id
|
|
29
|
+
@description = description
|
|
30
|
+
@payment_date = payment_date
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
34
|
+
def ==(other)
|
|
35
|
+
return false unless other.is_a? self.class
|
|
36
|
+
return false unless @amount == other.amount
|
|
37
|
+
return false unless @foreign_id == other.foreign_id
|
|
38
|
+
return false unless @description == other.description
|
|
39
|
+
return false unless @payment_date == other.payment_date
|
|
40
|
+
true
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateInvoicePayment
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateInvoicePayment
|
|
11
|
+
def amount(); end
|
|
12
|
+
def amount=(str_); end
|
|
13
|
+
def foreign_id(); end
|
|
14
|
+
def foreign_id=(str_); end
|
|
15
|
+
def description(); end
|
|
16
|
+
def description=(str_); end
|
|
17
|
+
def payment_date(); end
|
|
18
|
+
def payment_date=(str_); end
|
|
19
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Moov
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
# Defines the attributes of a transfer.
|
|
12
|
+
class CreateRunTransfer
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
field :amount, Models::Components::Amount, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
18
|
+
|
|
19
|
+
field :destination, Models::Components::SchedulePaymentMethod, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('destination'), required: true } }
|
|
20
|
+
|
|
21
|
+
field :partner_account_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('partnerAccountID'), required: true } }
|
|
22
|
+
|
|
23
|
+
field :source, Models::Components::SchedulePaymentMethod, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('source'), required: true } }
|
|
24
|
+
# Simple description to place on the transfer.
|
|
25
|
+
field :description, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description'), required: true } }
|
|
26
|
+
# Optional sales tax amount. This amount is included in the total transfer amount.
|
|
27
|
+
field :sales_tax_amount, Crystalline::Nilable.new(Models::Components::Amount), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('salesTaxAmount') } }
|
|
28
|
+
# An optional collection of line items for a scheduled transfer.
|
|
29
|
+
# When line items are provided their total must equal `amount` minus `salesTaxAmount`.
|
|
30
|
+
field :line_items, Crystalline::Nilable.new(Models::Components::CreateScheduledTransferLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
|
|
31
|
+
|
|
32
|
+
sig { params(amount: Models::Components::Amount, destination: Models::Components::SchedulePaymentMethod, partner_account_id: ::String, source: Models::Components::SchedulePaymentMethod, description: ::String, sales_tax_amount: T.nilable(Models::Components::Amount), line_items: T.nilable(Models::Components::CreateScheduledTransferLineItems)).void }
|
|
33
|
+
def initialize(amount:, destination:, partner_account_id:, source:, description:, sales_tax_amount: nil, line_items: nil)
|
|
34
|
+
@amount = amount
|
|
35
|
+
@destination = destination
|
|
36
|
+
@partner_account_id = partner_account_id
|
|
37
|
+
@source = source
|
|
38
|
+
@description = description
|
|
39
|
+
@sales_tax_amount = sales_tax_amount
|
|
40
|
+
@line_items = line_items
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
44
|
+
def ==(other)
|
|
45
|
+
return false unless other.is_a? self.class
|
|
46
|
+
return false unless @amount == other.amount
|
|
47
|
+
return false unless @destination == other.destination
|
|
48
|
+
return false unless @partner_account_id == other.partner_account_id
|
|
49
|
+
return false unless @source == other.source
|
|
50
|
+
return false unless @description == other.description
|
|
51
|
+
return false unless @sales_tax_amount == other.sales_tax_amount
|
|
52
|
+
return false unless @line_items == other.line_items
|
|
53
|
+
true
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateRunTransfer
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateRunTransfer
|
|
11
|
+
def amount(); end
|
|
12
|
+
def amount=(str_); end
|
|
13
|
+
def destination(); end
|
|
14
|
+
def destination=(str_); end
|
|
15
|
+
def partner_account_id(); end
|
|
16
|
+
def partner_account_id=(str_); end
|
|
17
|
+
def source(); end
|
|
18
|
+
def source=(str_); end
|
|
19
|
+
def description(); end
|
|
20
|
+
def description=(str_); end
|
|
21
|
+
def sales_tax_amount(); end
|
|
22
|
+
def sales_tax_amount=(str_); end
|
|
23
|
+
def line_items(); end
|
|
24
|
+
def line_items=(str_); end
|
|
25
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Moov
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
# Represents a single item in a scheduled transfer, including optional modifiers and quantity.
|
|
12
|
+
class CreateScheduledTransferLineItem
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
# The name of the item.
|
|
17
|
+
field :name, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name'), required: true } }
|
|
18
|
+
# The base price of the item before applying option modifiers.
|
|
19
|
+
field :base_price, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('basePrice'), required: true } }
|
|
20
|
+
# The quantity of this item.
|
|
21
|
+
field :quantity, ::Integer, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('quantity'), required: true } }
|
|
22
|
+
# Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
|
|
23
|
+
field :options, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::CreateScheduledTransferLineItemOption)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options') } }
|
|
24
|
+
# Optional unique identifier associating the line item with a product.
|
|
25
|
+
field :product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('productID') } }
|
|
26
|
+
# Optional list of images associated with this line item.
|
|
27
|
+
field :image_i_ds, Crystalline::Nilable.new(Crystalline::Array.new(::String)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('imageIDs') } }
|
|
28
|
+
|
|
29
|
+
sig { params(name: ::String, base_price: Models::Components::AmountDecimal, quantity: ::Integer, options: T.nilable(T::Array[Models::Components::CreateScheduledTransferLineItemOption]), product_id: T.nilable(::String), image_i_ds: T.nilable(T::Array[::String])).void }
|
|
30
|
+
def initialize(name:, base_price:, quantity:, options: nil, product_id: nil, image_i_ds: nil)
|
|
31
|
+
@name = name
|
|
32
|
+
@base_price = base_price
|
|
33
|
+
@quantity = quantity
|
|
34
|
+
@options = options
|
|
35
|
+
@product_id = product_id
|
|
36
|
+
@image_i_ds = image_i_ds
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
40
|
+
def ==(other)
|
|
41
|
+
return false unless other.is_a? self.class
|
|
42
|
+
return false unless @name == other.name
|
|
43
|
+
return false unless @base_price == other.base_price
|
|
44
|
+
return false unless @quantity == other.quantity
|
|
45
|
+
return false unless @options == other.options
|
|
46
|
+
return false unless @product_id == other.product_id
|
|
47
|
+
return false unless @image_i_ds == other.image_i_ds
|
|
48
|
+
true
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateScheduledTransferLineItem
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateScheduledTransferLineItem
|
|
11
|
+
def name(); end
|
|
12
|
+
def name=(str_); end
|
|
13
|
+
def base_price(); end
|
|
14
|
+
def base_price=(str_); end
|
|
15
|
+
def quantity(); end
|
|
16
|
+
def quantity=(str_); end
|
|
17
|
+
def options(); end
|
|
18
|
+
def options=(str_); end
|
|
19
|
+
def product_id(); end
|
|
20
|
+
def product_id=(str_); end
|
|
21
|
+
def image_i_ds(); end
|
|
22
|
+
def image_i_ds=(str_); end
|
|
23
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Moov
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
# Represents a modifier or option applied to a scheduled transfer line item.
|
|
12
|
+
class CreateScheduledTransferLineItemOption
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
# The name of the option or modifier.
|
|
17
|
+
field :name, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name'), required: true } }
|
|
18
|
+
# The quantity of this option.
|
|
19
|
+
field :quantity, ::Integer, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('quantity'), required: true } }
|
|
20
|
+
# Optional price modification applied by this option. Can be positive, negative, or zero.
|
|
21
|
+
field :price_modifier, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('priceModifier') } }
|
|
22
|
+
# Optional group identifier to categorize related options (e.g., 'toppings').
|
|
23
|
+
field :group, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('group') } }
|
|
24
|
+
# Optional list of images associated with this line item.
|
|
25
|
+
field :image_i_ds, Crystalline::Nilable.new(Crystalline::Array.new(::String)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('imageIDs') } }
|
|
26
|
+
|
|
27
|
+
sig { params(name: ::String, quantity: ::Integer, price_modifier: T.nilable(Models::Components::AmountDecimal), group: T.nilable(::String), image_i_ds: T.nilable(T::Array[::String])).void }
|
|
28
|
+
def initialize(name:, quantity:, price_modifier: nil, group: nil, image_i_ds: nil)
|
|
29
|
+
@name = name
|
|
30
|
+
@quantity = quantity
|
|
31
|
+
@price_modifier = price_modifier
|
|
32
|
+
@group = group
|
|
33
|
+
@image_i_ds = image_i_ds
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
37
|
+
def ==(other)
|
|
38
|
+
return false unless other.is_a? self.class
|
|
39
|
+
return false unless @name == other.name
|
|
40
|
+
return false unless @quantity == other.quantity
|
|
41
|
+
return false unless @price_modifier == other.price_modifier
|
|
42
|
+
return false unless @group == other.group
|
|
43
|
+
return false unless @image_i_ds == other.image_i_ds
|
|
44
|
+
true
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|