moov_ruby 0.1.30 → 0.1.31
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/models/components/amountdecimalvalidationerror.rb +37 -0
- data/lib/moov/models/components/amountdecimalvalidationerror.rbi +15 -0
- data/lib/moov/models/components/assignproductimage.rb +33 -0
- data/lib/moov/models/components/assignproductimage.rbi +13 -0
- data/lib/moov/models/components/assignproductimagevalidationerror.rb +33 -0
- data/lib/moov/models/components/assignproductimagevalidationerror.rbi +13 -0
- data/lib/moov/models/components/createproductoption.rb +49 -0
- data/lib/moov/models/components/createproductoption.rbi +19 -0
- data/lib/moov/models/components/createproductoptiongroup.rb +55 -0
- data/lib/moov/models/components/createproductoptiongroup.rbi +21 -0
- data/lib/moov/models/components/product.rb +69 -0
- data/lib/moov/models/components/product.rbi +29 -0
- data/lib/moov/models/components/productimagemetadata.rb +41 -0
- data/lib/moov/models/components/productimagemetadata.rbi +17 -0
- data/lib/moov/models/components/productoption.rb +49 -0
- data/lib/moov/models/components/productoption.rbi +19 -0
- data/lib/moov/models/components/productoptiongroup.rb +55 -0
- data/lib/moov/models/components/productoptiongroup.rbi +21 -0
- data/lib/moov/models/components/productoptiongroupvalidationerror.rb +49 -0
- data/lib/moov/models/components/productoptiongroupvalidationerror.rbi +21 -0
- data/lib/moov/models/components/productoptionvalidationerror.rb +45 -0
- data/lib/moov/models/components/productoptionvalidationerror.rbi +19 -0
- data/lib/moov/models/components/productrequest.rb +53 -0
- data/lib/moov/models/components/productrequest.rbi +21 -0
- data/lib/moov/models/components.rb +12 -0
- data/lib/moov/models/errors/productrequestvalidationerror.rb +53 -0
- data/lib/moov/models/errors/productrequestvalidationerror.rbi +23 -0
- data/lib/moov/models/errors.rb +1 -0
- data/lib/moov/models/operations/createproduct_request.rb +49 -0
- data/lib/moov/models/operations/createproduct_request.rbi +17 -0
- data/lib/moov/models/operations/createproduct_response.rb +49 -0
- data/lib/moov/models/operations/createproduct_response.rbi +21 -0
- data/lib/moov/models/operations/disableproduct_request.rb +49 -0
- data/lib/moov/models/operations/disableproduct_request.rbi +17 -0
- data/lib/moov/models/operations/disableproduct_response.rb +45 -0
- data/lib/moov/models/operations/disableproduct_response.rbi +19 -0
- data/lib/moov/models/operations/getproduct_request.rb +49 -0
- data/lib/moov/models/operations/getproduct_request.rbi +17 -0
- data/lib/moov/models/operations/getproduct_response.rb +49 -0
- data/lib/moov/models/operations/getproduct_response.rbi +21 -0
- data/lib/moov/models/operations/listproducts_request.rb +53 -0
- data/lib/moov/models/operations/listproducts_request.rbi +19 -0
- data/lib/moov/models/operations/listproducts_response.rb +49 -0
- data/lib/moov/models/operations/listproducts_response.rbi +21 -0
- data/lib/moov/models/operations/updateproduct_request.rb +53 -0
- data/lib/moov/models/operations/updateproduct_request.rbi +19 -0
- data/lib/moov/models/operations/updateproduct_response.rb +49 -0
- data/lib/moov/models/operations/updateproduct_response.rbi +21 -0
- data/lib/moov/models/operations.rb +10 -0
- data/lib/moov/products.rb +732 -0
- data/lib/moov/sdkconfiguration.rb +2 -2
- data/lib/moov_ruby.rb +1 -0
- metadata +49 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa28ab5c1b77d45defc4b9f76f5fe0260d2a2e131dc2ef738beb410c636431cf
|
4
|
+
data.tar.gz: b247ef2ee60a640acca407c237be79d312f13e058311b297dd214f80c0674c16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 017a90414455e155a6aeab2d441b77a43f33f371661c71dcbcb4bdc494d2455316659d21d5378c0b476450057bcd73539dc6804ac157974cb3ebaa49b4bcbc6f
|
7
|
+
data.tar.gz: 6ee38cc0ac8eafded0169fb20e298bbca5480b700f4bb0cf3808e95e2fb184c1b64525f47cde3eec5e755b732f114d8eebc4c0ea95bdeb09f409595cd74eb6b1
|
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, :payment_links, :payment_methods, :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, :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
|
20
20
|
|
21
21
|
sig do
|
22
22
|
params(
|
@@ -105,6 +105,7 @@ module Moov
|
|
105
105
|
@images = Images.new(@sdk_configuration)
|
106
106
|
@payment_links = PaymentLinks.new(@sdk_configuration)
|
107
107
|
@payment_methods = PaymentMethods.new(@sdk_configuration)
|
108
|
+
@products = Products.new(@sdk_configuration)
|
108
109
|
@representatives = Representatives.new(@sdk_configuration)
|
109
110
|
@scheduling = Scheduling.new(@sdk_configuration)
|
110
111
|
@statements = Statements.new(@sdk_configuration)
|
@@ -0,0 +1,37 @@
|
|
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 AmountDecimalValidationError
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :currency, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('currency') } }
|
18
|
+
|
19
|
+
field :value_decimal, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('valueDecimal') } }
|
20
|
+
|
21
|
+
sig { params(currency: T.nilable(::String), value_decimal: T.nilable(::String)).void }
|
22
|
+
def initialize(currency: nil, value_decimal: nil)
|
23
|
+
@currency = currency
|
24
|
+
@value_decimal = value_decimal
|
25
|
+
end
|
26
|
+
|
27
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
28
|
+
def ==(other)
|
29
|
+
return false unless other.is_a? self.class
|
30
|
+
return false unless @currency == other.currency
|
31
|
+
return false unless @value_decimal == other.value_decimal
|
32
|
+
true
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::AmountDecimalValidationError
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::AmountDecimalValidationError
|
11
|
+
def currency(); end
|
12
|
+
def currency=(str_); end
|
13
|
+
def value_decimal(); end
|
14
|
+
def value_decimal=(str_); end
|
15
|
+
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 AssignProductImage
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# Unique identifier for a product or product option image resource.
|
17
|
+
field :image_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('imageID'), required: true } }
|
18
|
+
|
19
|
+
sig { params(image_id: ::String).void }
|
20
|
+
def initialize(image_id:)
|
21
|
+
@image_id = image_id
|
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 @image_id == other.image_id
|
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::AssignProductImage
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::AssignProductImage
|
11
|
+
def image_id(); end
|
12
|
+
def image_id=(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 AssignProductImageValidationError
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :image_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('imageID') } }
|
18
|
+
|
19
|
+
sig { params(image_id: T.nilable(::String)).void }
|
20
|
+
def initialize(image_id: nil)
|
21
|
+
@image_id = image_id
|
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 @image_id == other.image_id
|
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::AssignProductImageValidationError
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::AssignProductImageValidationError
|
11
|
+
def image_id(); end
|
12
|
+
def image_id=(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 CreateProductOption
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# The display name of a product option.
|
17
|
+
field :name, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name'), required: true } }
|
18
|
+
# A detailed description of the option.
|
19
|
+
#
|
20
|
+
# - Must be valid UTF-8 text
|
21
|
+
# - Supports Markdown for formatting
|
22
|
+
# - HTML is not permitted and will be rejected
|
23
|
+
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
24
|
+
# The adjustment applied to a product's base price by this option. Can be negative, positive, or zero.
|
25
|
+
field :price_modifier, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('priceModifier') } }
|
26
|
+
# Assign previously uploaded images to a product or option.
|
27
|
+
field :images, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::AssignProductImage)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('images') } }
|
28
|
+
|
29
|
+
sig { params(name: ::String, description: T.nilable(::String), price_modifier: T.nilable(::String), images: T.nilable(T::Array[Models::Components::AssignProductImage])).void }
|
30
|
+
def initialize(name:, description: nil, price_modifier: nil, images: nil)
|
31
|
+
@name = name
|
32
|
+
@description = description
|
33
|
+
@price_modifier = price_modifier
|
34
|
+
@images = images
|
35
|
+
end
|
36
|
+
|
37
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
38
|
+
def ==(other)
|
39
|
+
return false unless other.is_a? self.class
|
40
|
+
return false unless @name == other.name
|
41
|
+
return false unless @description == other.description
|
42
|
+
return false unless @price_modifier == other.price_modifier
|
43
|
+
return false unless @images == other.images
|
44
|
+
true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::CreateProductOption
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::CreateProductOption
|
11
|
+
def name(); end
|
12
|
+
def name=(str_); end
|
13
|
+
def description(); end
|
14
|
+
def description=(str_); end
|
15
|
+
def price_modifier(); end
|
16
|
+
def price_modifier=(str_); end
|
17
|
+
def images(); end
|
18
|
+
def images=(str_); end
|
19
|
+
end
|
@@ -0,0 +1,55 @@
|
|
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 CreateProductOptionGroup
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :name, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name'), required: true } }
|
18
|
+
# The minimum number of options that must be selected from this group.
|
19
|
+
#
|
20
|
+
# A value of 0 indicates that no selection from this group is required.
|
21
|
+
field :min_select, ::Integer, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('minSelect'), required: true } }
|
22
|
+
# The maximum number of options that can be selected from this group.
|
23
|
+
field :max_select, ::Integer, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('maxSelect'), required: true } }
|
24
|
+
# The options available within this group.
|
25
|
+
field :options, Crystalline::Array.new(Models::Components::CreateProductOption), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options'), required: true } }
|
26
|
+
# A detailed description of the option group.
|
27
|
+
#
|
28
|
+
# - Must be valid UTF-8 text
|
29
|
+
# - Supports Markdown for formatting
|
30
|
+
# - HTML is not permitted and will be rejected
|
31
|
+
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
32
|
+
|
33
|
+
sig { params(name: ::String, min_select: ::Integer, max_select: ::Integer, options: T::Array[Models::Components::CreateProductOption], description: T.nilable(::String)).void }
|
34
|
+
def initialize(name:, min_select:, max_select:, options:, description: nil)
|
35
|
+
@name = name
|
36
|
+
@min_select = min_select
|
37
|
+
@max_select = max_select
|
38
|
+
@options = options
|
39
|
+
@description = description
|
40
|
+
end
|
41
|
+
|
42
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
43
|
+
def ==(other)
|
44
|
+
return false unless other.is_a? self.class
|
45
|
+
return false unless @name == other.name
|
46
|
+
return false unless @min_select == other.min_select
|
47
|
+
return false unless @max_select == other.max_select
|
48
|
+
return false unless @options == other.options
|
49
|
+
return false unless @description == other.description
|
50
|
+
true
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::CreateProductOptionGroup
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::CreateProductOptionGroup
|
11
|
+
def name(); end
|
12
|
+
def name=(str_); end
|
13
|
+
def min_select(); end
|
14
|
+
def min_select=(str_); end
|
15
|
+
def max_select(); end
|
16
|
+
def max_select=(str_); end
|
17
|
+
def options(); end
|
18
|
+
def options=(str_); end
|
19
|
+
def description(); end
|
20
|
+
def description=(str_); end
|
21
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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 product available for purchase, which may have optional configuration options.
|
12
|
+
class Product
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# Unique identifier for a product.
|
17
|
+
field :product_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('productID'), required: true } }
|
18
|
+
|
19
|
+
field :title, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('title'), required: true } }
|
20
|
+
# A product's starting price, before applying modifiers.
|
21
|
+
field :base_price, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('basePrice'), required: true } }
|
22
|
+
# The date and time when the product was added.
|
23
|
+
field :created_on, ::DateTime, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('createdOn'), required: true, 'decoder': Utils.datetime_from_iso_format(false) } }
|
24
|
+
# The date and time when the product was last updated.
|
25
|
+
field :updated_on, ::DateTime, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('updatedOn'), required: true, 'decoder': Utils.datetime_from_iso_format(false) } }
|
26
|
+
# A detailed description of the product.
|
27
|
+
#
|
28
|
+
# - Must be valid UTF-8 text
|
29
|
+
# - Supports Markdown for formatting
|
30
|
+
# - HTML is not permitted and will be rejected
|
31
|
+
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
32
|
+
# Optional configuration options for a product, such as size or color.
|
33
|
+
field :option_groups, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::ProductOptionGroup)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('optionGroups') } }
|
34
|
+
# Optional images associated with the product.
|
35
|
+
field :images, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::ProductImageMetadata)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('images') } }
|
36
|
+
# The date and time when the product was disabled.
|
37
|
+
field :disabled_on, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('disabledOn'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
38
|
+
|
39
|
+
sig { params(product_id: ::String, title: ::String, base_price: Models::Components::AmountDecimal, created_on: ::DateTime, updated_on: ::DateTime, description: T.nilable(::String), option_groups: T.nilable(T::Array[Models::Components::ProductOptionGroup]), images: T.nilable(T::Array[Models::Components::ProductImageMetadata]), disabled_on: T.nilable(::DateTime)).void }
|
40
|
+
def initialize(product_id:, title:, base_price:, created_on:, updated_on:, description: nil, option_groups: nil, images: nil, disabled_on: nil)
|
41
|
+
@product_id = product_id
|
42
|
+
@title = title
|
43
|
+
@base_price = base_price
|
44
|
+
@created_on = created_on
|
45
|
+
@updated_on = updated_on
|
46
|
+
@description = description
|
47
|
+
@option_groups = option_groups
|
48
|
+
@images = images
|
49
|
+
@disabled_on = disabled_on
|
50
|
+
end
|
51
|
+
|
52
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
53
|
+
def ==(other)
|
54
|
+
return false unless other.is_a? self.class
|
55
|
+
return false unless @product_id == other.product_id
|
56
|
+
return false unless @title == other.title
|
57
|
+
return false unless @base_price == other.base_price
|
58
|
+
return false unless @created_on == other.created_on
|
59
|
+
return false unless @updated_on == other.updated_on
|
60
|
+
return false unless @description == other.description
|
61
|
+
return false unless @option_groups == other.option_groups
|
62
|
+
return false unless @images == other.images
|
63
|
+
return false unless @disabled_on == other.disabled_on
|
64
|
+
true
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::Product
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::Product
|
11
|
+
def product_id(); end
|
12
|
+
def product_id=(str_); end
|
13
|
+
def title(); end
|
14
|
+
def title=(str_); end
|
15
|
+
def base_price(); end
|
16
|
+
def base_price=(str_); end
|
17
|
+
def created_on(); end
|
18
|
+
def created_on=(str_); end
|
19
|
+
def updated_on(); end
|
20
|
+
def updated_on=(str_); end
|
21
|
+
def description(); end
|
22
|
+
def description=(str_); end
|
23
|
+
def option_groups(); end
|
24
|
+
def option_groups=(str_); end
|
25
|
+
def images(); end
|
26
|
+
def images=(str_); end
|
27
|
+
def disabled_on(); end
|
28
|
+
def disabled_on=(str_); end
|
29
|
+
end
|
@@ -0,0 +1,41 @@
|
|
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 ProductImageMetadata
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# Unique identifier for a product or product option image resource.
|
17
|
+
field :image_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('imageID'), required: true } }
|
18
|
+
# The image's public URL.
|
19
|
+
field :link, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('link'), required: true } }
|
20
|
+
# Alternative text for the image.
|
21
|
+
field :alt_text, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('altText') } }
|
22
|
+
|
23
|
+
sig { params(image_id: ::String, link: ::String, alt_text: T.nilable(::String)).void }
|
24
|
+
def initialize(image_id:, link:, alt_text: nil)
|
25
|
+
@image_id = image_id
|
26
|
+
@link = link
|
27
|
+
@alt_text = alt_text
|
28
|
+
end
|
29
|
+
|
30
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
31
|
+
def ==(other)
|
32
|
+
return false unless other.is_a? self.class
|
33
|
+
return false unless @image_id == other.image_id
|
34
|
+
return false unless @link == other.link
|
35
|
+
return false unless @alt_text == other.alt_text
|
36
|
+
true
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::ProductImageMetadata
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::ProductImageMetadata
|
11
|
+
def image_id(); end
|
12
|
+
def image_id=(str_); end
|
13
|
+
def link(); end
|
14
|
+
def link=(str_); end
|
15
|
+
def alt_text(); end
|
16
|
+
def alt_text=(str_); end
|
17
|
+
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 single product option within a group.
|
12
|
+
class ProductOption
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# The display name of a product option.
|
17
|
+
field :name, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name'), required: true } }
|
18
|
+
# A detailed description of the option.
|
19
|
+
#
|
20
|
+
# - Must be valid UTF-8 text
|
21
|
+
# - Supports Markdown for formatting
|
22
|
+
# - HTML is not permitted and will be rejected
|
23
|
+
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
24
|
+
# The adjustment applied to a product's base price by this option. Can be negative, positive, or zero.
|
25
|
+
field :price_modifier, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('priceModifier') } }
|
26
|
+
# The images associated with this option.
|
27
|
+
field :images, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::ProductImageMetadata)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('images') } }
|
28
|
+
|
29
|
+
sig { params(name: ::String, description: T.nilable(::String), price_modifier: T.nilable(::String), images: T.nilable(T::Array[Models::Components::ProductImageMetadata])).void }
|
30
|
+
def initialize(name:, description: nil, price_modifier: nil, images: nil)
|
31
|
+
@name = name
|
32
|
+
@description = description
|
33
|
+
@price_modifier = price_modifier
|
34
|
+
@images = images
|
35
|
+
end
|
36
|
+
|
37
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
38
|
+
def ==(other)
|
39
|
+
return false unless other.is_a? self.class
|
40
|
+
return false unless @name == other.name
|
41
|
+
return false unless @description == other.description
|
42
|
+
return false unless @price_modifier == other.price_modifier
|
43
|
+
return false unless @images == other.images
|
44
|
+
true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::ProductOption
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::ProductOption
|
11
|
+
def name(); end
|
12
|
+
def name=(str_); end
|
13
|
+
def description(); end
|
14
|
+
def description=(str_); end
|
15
|
+
def price_modifier(); end
|
16
|
+
def price_modifier=(str_); end
|
17
|
+
def images(); end
|
18
|
+
def images=(str_); end
|
19
|
+
end
|
@@ -0,0 +1,55 @@
|
|
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 group of product configuration options, such as size or color.
|
12
|
+
class ProductOptionGroup
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :name, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name'), required: true } }
|
18
|
+
# The minimum number of options that must be selected from this group.
|
19
|
+
#
|
20
|
+
# A value of 0 indicates that no selection from this group is required.
|
21
|
+
field :min_select, ::Integer, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('minSelect'), required: true } }
|
22
|
+
# The maximum number of options that can be selected from this group.
|
23
|
+
field :max_select, ::Integer, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('maxSelect'), required: true } }
|
24
|
+
# The options available within this group.
|
25
|
+
field :options, Crystalline::Array.new(Models::Components::ProductOption), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options'), required: true } }
|
26
|
+
# A detailed description of the option group.
|
27
|
+
#
|
28
|
+
# - Must be valid UTF-8 text
|
29
|
+
# - Supports Markdown for formatting
|
30
|
+
# - HTML is not permitted and will be rejected
|
31
|
+
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
32
|
+
|
33
|
+
sig { params(name: ::String, min_select: ::Integer, max_select: ::Integer, options: T::Array[Models::Components::ProductOption], description: T.nilable(::String)).void }
|
34
|
+
def initialize(name:, min_select:, max_select:, options:, description: nil)
|
35
|
+
@name = name
|
36
|
+
@min_select = min_select
|
37
|
+
@max_select = max_select
|
38
|
+
@options = options
|
39
|
+
@description = description
|
40
|
+
end
|
41
|
+
|
42
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
43
|
+
def ==(other)
|
44
|
+
return false unless other.is_a? self.class
|
45
|
+
return false unless @name == other.name
|
46
|
+
return false unless @min_select == other.min_select
|
47
|
+
return false unless @max_select == other.max_select
|
48
|
+
return false unless @options == other.options
|
49
|
+
return false unless @description == other.description
|
50
|
+
true
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::ProductOptionGroup
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::ProductOptionGroup
|
11
|
+
def name(); end
|
12
|
+
def name=(str_); end
|
13
|
+
def min_select(); end
|
14
|
+
def min_select=(str_); end
|
15
|
+
def max_select(); end
|
16
|
+
def max_select=(str_); end
|
17
|
+
def options(); end
|
18
|
+
def options=(str_); end
|
19
|
+
def description(); end
|
20
|
+
def description=(str_); end
|
21
|
+
end
|