Class: Gusto::Employees::PaymentMethod::PaymentMethodUpdateRequestSplitsItem
- Inherits:
-
Object
- Object
- Gusto::Employees::PaymentMethod::PaymentMethodUpdateRequestSplitsItem
- Defined in:
- lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#name ⇒ String
readonly
The bank account name.
-
#priority ⇒ Object
readonly
bank account paid.
-
#split_amount ⇒ Integer
readonly
The cents amount allocated for each payment split.
-
#uuid ⇒ String
readonly
The bank account ID.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Employees::PaymentMethod::PaymentMethodUpdateRequestSplitsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(uuid: OMIT, name: OMIT, priority: OMIT, split_amount: OMIT, additional_properties: nil) ⇒ Gusto::Employees::PaymentMethod::PaymentMethodUpdateRequestSplitsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(uuid: OMIT, name: OMIT, priority: OMIT, split_amount: OMIT, additional_properties: nil) ⇒ Gusto::Employees::PaymentMethod::PaymentMethodUpdateRequestSplitsItem
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb', line 33 def initialize(uuid: OMIT, name: OMIT, priority: OMIT, split_amount: OMIT, additional_properties: nil) @uuid = uuid if uuid != OMIT @name = name if name != OMIT @priority = priority if priority != OMIT @split_amount = split_amount if split_amount != OMIT @additional_properties = additional_properties @_field_set = { "uuid": uuid, "name": name, "priority": priority, "split_amount": split_amount }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
19 20 21 |
# File 'lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb', line 19 def additional_properties @additional_properties end |
#name ⇒ String (readonly)
Returns The bank account name.
12 13 14 |
# File 'lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb', line 12 def name @name end |
#priority ⇒ Object (readonly)
bank account paid. Priority must be unique and sequential.
15 16 17 |
# File 'lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb', line 15 def priority @priority end |
#split_amount ⇒ Integer (readonly)
Returns The cents amount allocated for each payment split.
17 18 19 |
# File 'lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb', line 17 def split_amount @split_amount end |
#uuid ⇒ String (readonly)
Returns The bank account ID.
10 11 12 |
# File 'lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb', line 10 def uuid @uuid end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Employees::PaymentMethod::PaymentMethodUpdateRequestSplitsItem
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb', line 47 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) uuid = parsed_json["uuid"] name = parsed_json["name"] priority = parsed_json["priority"] split_amount = parsed_json["split_amount"] new( uuid: uuid, name: name, priority: priority, split_amount: split_amount, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
74 75 76 77 78 79 |
# File 'lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb', line 74 def self.validate_raw(obj:) obj.uuid&.is_a?(String) != false || raise("Passed value for field obj.uuid is not the expected type, validation failed.") obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.priority&.is_a?(Integer) != false || raise("Passed value for field obj.priority is not the expected type, validation failed.") obj.split_amount&.is_a?(Integer) != false || raise("Passed value for field obj.split_amount is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
65 66 67 |
# File 'lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb', line 65 def to_json @_field_set&.to_json end |