moov_ruby 0.3.7 → 0.3.9
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/crystalline/metadata_fields.rb +9 -16
- data/lib/crystalline/types.rb +23 -18
- data/lib/moov/accounts.rb +1 -1
- data/lib/moov/apple_pay.rb +3 -3
- data/lib/moov/branding.rb +1 -1
- data/lib/moov/card_issuing.rb +1 -1
- data/lib/moov/cards.rb +6 -6
- data/lib/moov/images.rb +5 -6
- data/lib/moov/models/components/createevidencefilemultipart.rb +1 -1
- data/lib/moov/models/components/createinvoice.rb +2 -2
- data/lib/moov/models/components/createinvoicelineitem.rb +53 -0
- data/lib/moov/models/components/createinvoicelineitem.rbi +23 -0
- data/lib/moov/models/components/createinvoicelineitemoption.rb +49 -0
- data/lib/moov/models/components/createinvoicelineitemoption.rbi +21 -0
- data/lib/moov/models/components/createinvoicelineitemoptionvalidationerror.rb +45 -0
- data/lib/moov/models/components/createinvoicelineitemoptionvalidationerror.rbi +19 -0
- data/lib/moov/models/components/createinvoicelineitems.rb +33 -0
- data/lib/moov/models/components/{invoicelineitemsupdate.rbi → createinvoicelineitems.rbi} +2 -2
- data/lib/moov/models/components/{invoicelineitemsupdate.rb → createinvoicelineitemsupdate.rb} +3 -3
- data/lib/moov/models/components/createinvoicelineitemsupdate.rbi +13 -0
- data/lib/moov/models/components/createinvoicelineitemsvalidationerror.rb +33 -0
- data/lib/moov/models/components/createinvoicelineitemsvalidationerror.rbi +13 -0
- data/lib/moov/models/components/createinvoicelineitemvalidationerror.rb +49 -0
- data/lib/moov/models/components/createinvoicelineitemvalidationerror.rbi +21 -0
- data/lib/moov/models/components/createpaymentlink.rb +0 -1
- data/lib/moov/models/components/fileuploadrequestmultipart.rb +2 -2
- data/lib/moov/models/components/{imageuploadrequestmultipart_image.rb → image.rb} +1 -1
- data/lib/moov/models/components/{imageupdaterequestmultipart_image.rbi → image.rbi} +2 -2
- data/lib/moov/models/components/imageuploadrequestmultipart.rb +4 -4
- data/lib/moov/models/components/invoicelineitem.rb +10 -6
- data/lib/moov/models/components/invoicelineitem.rbi +4 -2
- data/lib/moov/models/components/invoicelineitemimagemetadata.rb +45 -0
- data/lib/moov/models/components/invoicelineitemimagemetadata.rbi +19 -0
- data/lib/moov/models/components/patchsweepconfig.rb +4 -4
- data/lib/moov/models/components/updateinvoice.rb +2 -2
- data/lib/moov/models/components/updaterepresentative.rb +2 -2
- data/lib/moov/models/components.rb +9 -13
- data/lib/moov/models/errors/createinvoiceerror.rb +2 -2
- data/lib/moov/models/operations/createapplepaysession_response.rb +1 -1
- data/lib/moov/models/operations/createpaymentlink_request.rb +1 -1
- data/lib/moov/models/operations/disablepaymentlink_request.rb +1 -1
- data/lib/moov/models/operations/getpaymentlink_request.rb +1 -1
- data/lib/moov/models/operations/getpaymentlinkqrcode_request.rb +1 -1
- data/lib/moov/models/operations/listpaymentlinks_request.rb +1 -1
- data/lib/moov/models/operations/updateimage_request.rb +5 -5
- data/lib/moov/models/operations/updateimage_request.rbi +2 -2
- data/lib/moov/models/operations/updatepaymentlink_request.rb +1 -1
- data/lib/moov/payment_links.rb +1 -1
- data/lib/moov/representatives.rb +2 -2
- data/lib/moov/sdk_hooks/hooks.rb +0 -1
- data/lib/moov/sdkconfiguration.rb +3 -3
- data/lib/moov/support.rb +1 -1
- data/lib/moov/sweeps.rb +1 -1
- data/lib/moov/transfers.rb +3 -3
- data/lib/moov/utils/forms.rb +1 -1
- data/lib/moov/wallets.rb +1 -1
- metadata +20 -28
- data/lib/moov/models/components/email.rb +0 -28
- data/lib/moov/models/components/email.rbi +0 -11
- data/lib/moov/models/components/email_union.rb +0 -28
- data/lib/moov/models/components/email_union.rbi +0 -11
- data/lib/moov/models/components/imageupdaterequestmultipart.rb +0 -39
- data/lib/moov/models/components/imageupdaterequestmultipart.rbi +0 -15
- data/lib/moov/models/components/imageupdaterequestmultipart_image.rb +0 -37
- data/lib/moov/models/components/imageuploadrequestmultipart_image.rbi +0 -15
- data/lib/moov/models/components/metadata.rb +0 -35
- data/lib/moov/models/components/metadata.rbi +0 -13
- data/lib/moov/models/components/pullpaymentmethodid.rb +0 -28
- data/lib/moov/models/components/pullpaymentmethodid.rbi +0 -11
- data/lib/moov/models/components/pullpaymentmethodid_union.rb +0 -28
- data/lib/moov/models/components/pullpaymentmethodid_union.rbi +0 -11
- data/lib/moov/models/components/pushpaymentmethodid.rb +0 -28
- data/lib/moov/models/components/pushpaymentmethodid.rbi +0 -11
- data/lib/moov/models/components/pushpaymentmethodid_union.rb +0 -28
- data/lib/moov/models/components/pushpaymentmethodid_union.rbi +0 -11
- data/lib/moov/models/components/statementdescriptor.rb +0 -28
- data/lib/moov/models/components/statementdescriptor.rbi +0 -11
- data/lib/moov/models/components/statementdescriptor_union.rb +0 -28
- data/lib/moov/models/components/statementdescriptor_union.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: 57b60a03b0e8670790f3a6e6abeb49a96cdf106a715ec4e599e7f4e92c90a5df
|
|
4
|
+
data.tar.gz: d3568dec1b5880ad2e377f4c82edf2abf9b921a0a933a107de73481832b6a76a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eed5c4095693c05bc4cc35e9dda1b2d146ecf9242b5cce579f82f741418d3a70897ae0396d35a3c3c1fd4016072cc8499fb5fd1ae3b51acb5b9911f167417a24
|
|
7
|
+
data.tar.gz: c59b08d88dcefee5d5508d5e1ad7a3fce13ad750300526cbaaf26e92fc657ceb8a6ed49723a5e99ae2482f90abba244cbda57593c208460067c33626594363a6
|
|
@@ -62,20 +62,6 @@ module Crystalline
|
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
-
def from_json(json_obj)
|
|
66
|
-
case json_obj
|
|
67
|
-
when String
|
|
68
|
-
begin
|
|
69
|
-
d = JSON.parse(json_obj)
|
|
70
|
-
rescue JSON::ParserError
|
|
71
|
-
d = json_obj
|
|
72
|
-
end
|
|
73
|
-
else
|
|
74
|
-
d = json_obj
|
|
75
|
-
end
|
|
76
|
-
from_json(d)
|
|
77
|
-
end
|
|
78
|
-
|
|
79
65
|
def from_dict(d)
|
|
80
66
|
to_build = {}
|
|
81
67
|
|
|
@@ -111,9 +97,16 @@ module Crystalline
|
|
|
111
97
|
to_build[key] = unmarshalled_hash
|
|
112
98
|
elsif Crystalline::Utils.union? field_type
|
|
113
99
|
discriminator = field.metadata.fetch(:discriminator, nil)
|
|
100
|
+
discriminator_mapping = field.metadata.fetch(:discriminator_mapping, nil)
|
|
114
101
|
if !discriminator.nil?
|
|
115
|
-
|
|
116
|
-
|
|
102
|
+
discriminator_value = value.fetch(discriminator)
|
|
103
|
+
if !discriminator_mapping.nil?
|
|
104
|
+
# Use explicit mapping from discriminator value to type
|
|
105
|
+
type_to_deserialize = discriminator_mapping[discriminator_value]
|
|
106
|
+
else
|
|
107
|
+
# Fallback: try to match discriminator value against type name
|
|
108
|
+
type_to_deserialize = Crystalline::Utils.get_union_types(field_type).find { |t| t.name.split('::').last == discriminator_value }
|
|
109
|
+
end
|
|
117
110
|
to_build[key] = Crystalline.unmarshal_json(value, type_to_deserialize)
|
|
118
111
|
else
|
|
119
112
|
union_types = Crystalline::Utils.get_union_types(field_type)
|
data/lib/crystalline/types.rb
CHANGED
|
@@ -41,38 +41,43 @@ module Crystalline
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
module Enum
|
|
44
|
+
def self.included(base)
|
|
45
|
+
base.extend(ClassMethods)
|
|
46
|
+
end
|
|
47
|
+
|
|
44
48
|
def initialize(val)
|
|
45
|
-
|
|
46
|
-
if instance_methods(false).include?(:initialize)
|
|
49
|
+
if self.class.instance_methods(false).include?(:initialize)
|
|
47
50
|
super(val)
|
|
48
51
|
else
|
|
49
52
|
@val = val
|
|
50
53
|
end
|
|
51
54
|
end
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
module ClassMethods
|
|
57
|
+
def enums(&blk)
|
|
58
|
+
@mapping = {}
|
|
59
|
+
|
|
60
|
+
yield
|
|
61
|
+
constants(false).each do |const_name|
|
|
62
|
+
instance = const_get(const_name, false)
|
|
63
|
+
unless instance.is_a? self
|
|
64
|
+
raise 'Enum constants must be instances of the Enum class (e.g. `Foo = new`)'
|
|
65
|
+
end
|
|
66
|
+
@mapping[instance.serialize] = instance
|
|
67
|
+
end
|
|
68
|
+
end
|
|
55
69
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
raise
|
|
70
|
+
def deserialize(val)
|
|
71
|
+
if @mapping.include? val
|
|
72
|
+
@mapping[val]
|
|
73
|
+
else
|
|
74
|
+
raise "Invalid value for enum: #{val}"
|
|
61
75
|
end
|
|
62
|
-
@mapping[instance.serialize] = instance
|
|
63
76
|
end
|
|
64
77
|
end
|
|
65
78
|
|
|
66
79
|
def serialize
|
|
67
80
|
@val
|
|
68
81
|
end
|
|
69
|
-
|
|
70
|
-
def deserialize(val)
|
|
71
|
-
if @mapping.include? val
|
|
72
|
-
@mapping[val]
|
|
73
|
-
else
|
|
74
|
-
raise "Invalid value for enum: #{val}"
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
82
|
end
|
|
78
83
|
end
|
data/lib/moov/accounts.rb
CHANGED
|
@@ -457,7 +457,7 @@ module Moov
|
|
|
457
457
|
#
|
|
458
458
|
# If you need to update information in a locked state, please contact Moov support.
|
|
459
459
|
#
|
|
460
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
460
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
461
461
|
# to specify the `/accounts/{accountID}/profile.write` scope.
|
|
462
462
|
request = Models::Operations::UpdateAccountRequest.new(
|
|
463
463
|
account_id: account_id,
|
data/lib/moov/apple_pay.rb
CHANGED
|
@@ -193,12 +193,12 @@ module Moov
|
|
|
193
193
|
|
|
194
194
|
sig { params(update_apple_pay_merchant_domains: Models::Components::UpdateApplePayMerchantDomains, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateApplePayMerchantDomainsResponse) }
|
|
195
195
|
def update_merchant_domains(update_apple_pay_merchant_domains:, account_id:, x_moov_version: nil, timeout_ms: nil)
|
|
196
|
-
# update_merchant_domains - Add or remove domains to be registered with Apple Pay.
|
|
196
|
+
# update_merchant_domains - Add or remove domains to be registered with Apple Pay.
|
|
197
197
|
#
|
|
198
|
-
# Any domains that will be used to accept payments must first be [verified](https://docs.moov.io/guides/sources/cards/apple-pay/#register-your-domains)
|
|
198
|
+
# Any domains that will be used to accept payments must first be [verified](https://docs.moov.io/guides/sources/cards/apple-pay/#register-your-domains)
|
|
199
199
|
# with Apple.
|
|
200
200
|
#
|
|
201
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
201
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
202
202
|
# you'll need to specify the `/accounts/{accountID}/apple-pay.write` scope.
|
|
203
203
|
request = Models::Operations::UpdateApplePayMerchantDomainsRequest.new(
|
|
204
204
|
account_id: account_id,
|
data/lib/moov/branding.rb
CHANGED
|
@@ -492,7 +492,7 @@ module Moov
|
|
|
492
492
|
def update(update_brand:, account_id:, x_moov_version: nil, timeout_ms: nil)
|
|
493
493
|
# update - Updates the brand properties for the specified account.
|
|
494
494
|
#
|
|
495
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
495
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
496
496
|
# you'll need to specify the `/accounts/{accountID}/branding.write` scope.
|
|
497
497
|
request = Models::Operations::UpdateBrandRequest.new(
|
|
498
498
|
account_id: account_id,
|
data/lib/moov/card_issuing.rb
CHANGED
|
@@ -448,7 +448,7 @@ module Moov
|
|
|
448
448
|
def update(update_issued_card:, account_id:, issued_card_id:, x_moov_version: nil, timeout_ms: nil)
|
|
449
449
|
# update - Update a Moov issued card.
|
|
450
450
|
#
|
|
451
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
451
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
452
452
|
# you'll need to specify the `/accounts/{accountID}/issued-cards.write` scope.
|
|
453
453
|
request = Models::Operations::UpdateIssuedCardRequest.new(
|
|
454
454
|
account_id: account_id,
|
data/lib/moov/cards.rb
CHANGED
|
@@ -467,18 +467,18 @@ module Moov
|
|
|
467
467
|
|
|
468
468
|
sig { params(update_card: Models::Components::UpdateCard, account_id: ::String, card_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateCardResponse) }
|
|
469
469
|
def update(update_card:, account_id:, card_id:, x_moov_version: nil, timeout_ms: nil)
|
|
470
|
-
# update - Update a linked card and/or resubmit it for verification.
|
|
470
|
+
# update - Update a linked card and/or resubmit it for verification.
|
|
471
471
|
#
|
|
472
|
-
# If a value is provided for CVV, a new verification ($0 authorization) will be submitted for the card. Updating the expiration
|
|
473
|
-
# date or
|
|
472
|
+
# If a value is provided for CVV, a new verification ($0 authorization) will be submitted for the card. Updating the expiration
|
|
473
|
+
# date or
|
|
474
474
|
# address will update the information stored on file for the card but will not be verified.
|
|
475
475
|
#
|
|
476
|
-
# Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/#reverify-a-card) to learn
|
|
476
|
+
# Read our [accept card payments guide](https://docs.moov.io/guides/sources/cards/accept-card-payments/#reverify-a-card) to learn
|
|
477
477
|
# more.
|
|
478
478
|
#
|
|
479
|
-
# Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.
|
|
479
|
+
# Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.
|
|
480
480
|
#
|
|
481
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
481
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
482
482
|
# you'll need to specify the `/accounts/{accountID}/cards.write` scope.
|
|
483
483
|
request = Models::Operations::UpdateCardRequest.new(
|
|
484
484
|
account_id: account_id,
|
data/lib/moov/images.rb
CHANGED
|
@@ -442,17 +442,16 @@ module Moov
|
|
|
442
442
|
end
|
|
443
443
|
|
|
444
444
|
|
|
445
|
-
sig { params(
|
|
446
|
-
def update(
|
|
445
|
+
sig { params(image_upload_request_multi_part: Models::Components::ImageUploadRequestMultiPart, account_id: ::String, image_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateImageResponse) }
|
|
446
|
+
def update(image_upload_request_multi_part:, account_id:, image_id:, x_moov_version: nil, timeout_ms: nil)
|
|
447
447
|
# update - Replace an existing image and, optionally, its metadata.
|
|
448
448
|
#
|
|
449
449
|
# This endpoint replaces the existing image with the new PNG, JPEG, or WebP. Omit
|
|
450
|
-
# the metadata form section to keep existing metadata,
|
|
451
|
-
# Duplicate images, and requests larger than 16MB will be rejected.
|
|
450
|
+
# the metadata form section to keep existing metadata. Duplicate images, and requests larger than 16MB will be rejected.
|
|
452
451
|
request = Models::Operations::UpdateImageRequest.new(
|
|
453
452
|
account_id: account_id,
|
|
454
453
|
image_id: image_id,
|
|
455
|
-
|
|
454
|
+
image_upload_request_multi_part: image_upload_request_multi_part,
|
|
456
455
|
x_moov_version: x_moov_version
|
|
457
456
|
)
|
|
458
457
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -466,7 +465,7 @@ module Moov
|
|
|
466
465
|
)
|
|
467
466
|
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
|
468
467
|
headers = T.cast(headers, T::Hash[String, String])
|
|
469
|
-
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :
|
|
468
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :image_upload_request_multi_part, :multipart)
|
|
470
469
|
headers['content-type'] = req_content_type
|
|
471
470
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
472
471
|
|
|
@@ -15,7 +15,7 @@ module Moov
|
|
|
15
15
|
|
|
16
16
|
# The file to upload as evidence. Valid types are [jpeg, tiff, pdf] with a limit of 4MB per file.
|
|
17
17
|
#
|
|
18
|
-
#
|
|
18
|
+
# The `Content-Type` header for this form part must be one of the following:
|
|
19
19
|
# - `image/jpeg`
|
|
20
20
|
# - `image/tiff`
|
|
21
21
|
# - `application/pdf`
|
|
@@ -18,7 +18,7 @@ module Moov
|
|
|
18
18
|
|
|
19
19
|
field :description, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description'), required: true } }
|
|
20
20
|
# A collection of line items for an invoice.
|
|
21
|
-
field :line_items, Models::Components::
|
|
21
|
+
field :line_items, Models::Components::CreateInvoiceLineItems, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems'), required: true } }
|
|
22
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
|
|
|
@@ -26,7 +26,7 @@ module Moov
|
|
|
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, description: ::String, line_items: Models::Components::
|
|
29
|
+
sig { params(customer_account_id: ::String, description: ::String, line_items: Models::Components::CreateInvoiceLineItems, invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime), tax_amount: T.nilable(Models::Components::AmountDecimal)).void }
|
|
30
30
|
def initialize(customer_account_id:, description:, line_items:, invoice_date: nil, due_date: nil, tax_amount: nil)
|
|
31
31
|
@customer_account_id = customer_account_id
|
|
32
32
|
@description = description
|
|
@@ -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 an invoice, including optional modifiers and quantity.
|
|
12
|
+
class CreateInvoiceLineItem
|
|
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 unique identifier associating the line item with a product.
|
|
23
|
+
field :product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('productID') } }
|
|
24
|
+
# Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
|
|
25
|
+
field :options, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::CreateInvoiceLineItemOption)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options') } }
|
|
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, product_id: T.nilable(::String), options: T.nilable(T::Array[Models::Components::CreateInvoiceLineItemOption]), image_i_ds: T.nilable(T::Array[::String])).void }
|
|
30
|
+
def initialize(name:, base_price:, quantity:, product_id: nil, options: nil, image_i_ds: nil)
|
|
31
|
+
@name = name
|
|
32
|
+
@base_price = base_price
|
|
33
|
+
@quantity = quantity
|
|
34
|
+
@product_id = product_id
|
|
35
|
+
@options = options
|
|
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 @product_id == other.product_id
|
|
46
|
+
return false unless @options == other.options
|
|
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::CreateInvoiceLineItem
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateInvoiceLineItem
|
|
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 product_id(); end
|
|
18
|
+
def product_id=(str_); end
|
|
19
|
+
def options(); end
|
|
20
|
+
def options=(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 line item.
|
|
12
|
+
class CreateInvoiceLineItemOption
|
|
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
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateInvoiceLineItemOption
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateInvoiceLineItemOption
|
|
11
|
+
def name(); end
|
|
12
|
+
def name=(str_); end
|
|
13
|
+
def quantity(); end
|
|
14
|
+
def quantity=(str_); end
|
|
15
|
+
def price_modifier(); end
|
|
16
|
+
def price_modifier=(str_); end
|
|
17
|
+
def group(); end
|
|
18
|
+
def group=(str_); end
|
|
19
|
+
def image_i_ds(); end
|
|
20
|
+
def image_i_ds=(str_); end
|
|
21
|
+
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 CreateInvoiceLineItemOptionValidationError
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
field :name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name') } }
|
|
18
|
+
|
|
19
|
+
field :group, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('group') } }
|
|
20
|
+
|
|
21
|
+
field :price_modifier, Crystalline::Nilable.new(Models::Components::AmountDecimalValidationError), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('priceModifier') } }
|
|
22
|
+
|
|
23
|
+
field :quantity, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('quantity') } }
|
|
24
|
+
|
|
25
|
+
sig { params(name: T.nilable(::String), group: T.nilable(::String), price_modifier: T.nilable(Models::Components::AmountDecimalValidationError), quantity: T.nilable(::String)).void }
|
|
26
|
+
def initialize(name: nil, group: nil, price_modifier: nil, quantity: nil)
|
|
27
|
+
@name = name
|
|
28
|
+
@group = group
|
|
29
|
+
@price_modifier = price_modifier
|
|
30
|
+
@quantity = quantity
|
|
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 @name == other.name
|
|
37
|
+
return false unless @group == other.group
|
|
38
|
+
return false unless @price_modifier == other.price_modifier
|
|
39
|
+
return false unless @quantity == other.quantity
|
|
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::CreateInvoiceLineItemOptionValidationError
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateInvoiceLineItemOptionValidationError
|
|
11
|
+
def name(); end
|
|
12
|
+
def name=(str_); end
|
|
13
|
+
def group(); end
|
|
14
|
+
def group=(str_); end
|
|
15
|
+
def price_modifier(); end
|
|
16
|
+
def price_modifier=(str_); end
|
|
17
|
+
def quantity(); end
|
|
18
|
+
def quantity=(str_); end
|
|
19
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
# A collection of line items for an invoice.
|
|
12
|
+
class CreateInvoiceLineItems
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
# The list of line items.
|
|
17
|
+
field :items, Crystalline::Array.new(Models::Components::CreateInvoiceLineItem), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('items'), required: true } }
|
|
18
|
+
|
|
19
|
+
sig { params(items: T::Array[Models::Components::CreateInvoiceLineItem]).void }
|
|
20
|
+
def initialize(items:)
|
|
21
|
+
@items = items
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
25
|
+
def ==(other)
|
|
26
|
+
return false unless other.is_a? self.class
|
|
27
|
+
return false unless @items == other.items
|
|
28
|
+
true
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class Moov::Models::Components::
|
|
5
|
+
class Moov::Models::Components::CreateInvoiceLineItems
|
|
6
6
|
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class Moov::Models::Components::
|
|
10
|
+
class Moov::Models::Components::CreateInvoiceLineItems
|
|
11
11
|
def items(); end
|
|
12
12
|
def items=(str_); end
|
|
13
13
|
end
|
data/lib/moov/models/components/{invoicelineitemsupdate.rb → createinvoicelineitemsupdate.rb}
RENAMED
|
@@ -9,14 +9,14 @@ module Moov
|
|
|
9
9
|
module Components
|
|
10
10
|
|
|
11
11
|
# A collection of line items for an invoice.
|
|
12
|
-
class
|
|
12
|
+
class CreateInvoiceLineItemsUpdate
|
|
13
13
|
extend T::Sig
|
|
14
14
|
include Crystalline::MetadataFields
|
|
15
15
|
|
|
16
16
|
# The list of line items.
|
|
17
|
-
field :items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::
|
|
17
|
+
field :items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::CreateInvoiceLineItem)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('items') } }
|
|
18
18
|
|
|
19
|
-
sig { params(items: T.nilable(T::Array[Models::Components::
|
|
19
|
+
sig { params(items: T.nilable(T::Array[Models::Components::CreateInvoiceLineItem])).void }
|
|
20
20
|
def initialize(items: nil)
|
|
21
21
|
@items = items
|
|
22
22
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateInvoiceLineItemsUpdate
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateInvoiceLineItemsUpdate
|
|
11
|
+
def items(); end
|
|
12
|
+
def items=(str_); end
|
|
13
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
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 CreateInvoiceLineItemsValidationError
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
field :items, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, Models::Components::CreateInvoiceLineItemValidationError)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('items') } }
|
|
18
|
+
|
|
19
|
+
sig { params(items: T.nilable(T::Hash[Symbol, Models::Components::CreateInvoiceLineItemValidationError])).void }
|
|
20
|
+
def initialize(items: nil)
|
|
21
|
+
@items = items
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
25
|
+
def ==(other)
|
|
26
|
+
return false unless other.is_a? self.class
|
|
27
|
+
return false unless @items == other.items
|
|
28
|
+
true
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateInvoiceLineItemsValidationError
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateInvoiceLineItemsValidationError
|
|
11
|
+
def items(); end
|
|
12
|
+
def items=(str_); end
|
|
13
|
+
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
|
+
|
|
12
|
+
class CreateInvoiceLineItemValidationError
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
field :product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('productID') } }
|
|
18
|
+
|
|
19
|
+
field :name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name') } }
|
|
20
|
+
|
|
21
|
+
field :base_price, Crystalline::Nilable.new(Models::Components::AmountDecimalValidationError), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('basePrice') } }
|
|
22
|
+
|
|
23
|
+
field :options, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, Models::Components::CreateInvoiceLineItemOptionValidationError)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options') } }
|
|
24
|
+
|
|
25
|
+
field :quantity, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('quantity') } }
|
|
26
|
+
|
|
27
|
+
sig { params(product_id: T.nilable(::String), name: T.nilable(::String), base_price: T.nilable(Models::Components::AmountDecimalValidationError), options: T.nilable(T::Hash[Symbol, Models::Components::CreateInvoiceLineItemOptionValidationError]), quantity: T.nilable(::String)).void }
|
|
28
|
+
def initialize(product_id: nil, name: nil, base_price: nil, options: nil, quantity: nil)
|
|
29
|
+
@product_id = product_id
|
|
30
|
+
@name = name
|
|
31
|
+
@base_price = base_price
|
|
32
|
+
@options = options
|
|
33
|
+
@quantity = quantity
|
|
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 @product_id == other.product_id
|
|
40
|
+
return false unless @name == other.name
|
|
41
|
+
return false unless @base_price == other.base_price
|
|
42
|
+
return false unless @options == other.options
|
|
43
|
+
return false unless @quantity == other.quantity
|
|
44
|
+
true
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|