Class: Gusto::ContractorPaymentReceiptLicensee
- Inherits:
-
Object
- Object
- Gusto::ContractorPaymentReceiptLicensee
- Defined in:
- lib/fern_gusto/types/contractor_payment_receipt_licensee.rb
Overview
The licensed payroll processor
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#address ⇒ String
readonly
Always the fixed string “525 20th St”.
-
#city ⇒ String
readonly
Always the fixed string “San Francisco”.
-
#name ⇒ String
readonly
Always the fixed string “Gusto, Zenpayroll Inc.”.
-
#phone_number ⇒ String
readonly
Always the fixed string “4157778888”.
-
#postal_code ⇒ String
readonly
Always the fixed string “94107”.
-
#state ⇒ String
readonly
Always the fixed string “CA”.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(name: OMIT, address: OMIT, city: OMIT, state: OMIT, postal_code: OMIT, phone_number: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPaymentReceiptLicensee constructor
- #to_json ⇒ String
Constructor Details
#initialize(name: OMIT, address: OMIT, city: OMIT, state: OMIT, postal_code: OMIT, phone_number: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPaymentReceiptLicensee
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 36 def initialize(name: OMIT, address: OMIT, city: OMIT, state: OMIT, postal_code: OMIT, phone_number: OMIT, additional_properties: nil) @name = name if name != OMIT @address = address if address != OMIT @city = city if city != OMIT @state = state if state != OMIT @postal_code = postal_code if postal_code != OMIT @phone_number = phone_number if phone_number != OMIT @additional_properties = additional_properties @_field_set = { "name": name, "address": address, "city": city, "state": state, "postal_code": postal_code, "phone_number": phone_number }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
21 22 23 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 21 def additional_properties @additional_properties end |
#address ⇒ String (readonly)
Returns Always the fixed string “525 20th St”.
11 12 13 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 11 def address @address end |
#city ⇒ String (readonly)
Returns Always the fixed string “San Francisco”.
13 14 15 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 13 def city @city end |
#name ⇒ String (readonly)
Returns Always the fixed string “Gusto, Zenpayroll Inc.”.
9 10 11 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 9 def name @name end |
#phone_number ⇒ String (readonly)
Returns Always the fixed string “4157778888”.
19 20 21 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 19 def phone_number @phone_number end |
#postal_code ⇒ String (readonly)
Returns Always the fixed string “94107”.
17 18 19 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 17 def postal_code @postal_code end |
#state ⇒ String (readonly)
Returns Always the fixed string “CA”.
15 16 17 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 15 def state @state end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::ContractorPaymentReceiptLicensee
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 52 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) name = parsed_json["name"] address = parsed_json["address"] city = parsed_json["city"] state = parsed_json["state"] postal_code = parsed_json["postal_code"] phone_number = parsed_json["phone_number"] new( name: name, address: address, city: city, state: state, postal_code: postal_code, phone_number: phone_number, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
83 84 85 86 87 88 89 90 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 83 def self.validate_raw(obj:) obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.address&.is_a?(String) != false || raise("Passed value for field obj.address is not the expected type, validation failed.") obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.") obj.state&.is_a?(String) != false || raise("Passed value for field obj.state is not the expected type, validation failed.") obj.postal_code&.is_a?(String) != false || raise("Passed value for field obj.postal_code is not the expected type, validation failed.") obj.phone_number&.is_a?(String) != false || raise("Passed value for field obj.phone_number is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
74 75 76 |
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 74 def to_json @_field_set&.to_json end |