Method: Merge::Accounting::AccountIntegration.from_json

Defined in:
lib/merge_ruby_client/accounting/types/account_integration.rb

.from_json(json_object:) ⇒ Merge::Accounting::AccountIntegration

Deserialize a JSON object to an instance of AccountIntegration

Parameters:

  • json_object (String)

Returns:



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/merge_ruby_client/accounting/types/account_integration.rb', line 94

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  name = parsed_json["name"]
  categories = parsed_json["categories"]
  image = parsed_json["image"]
  square_image = parsed_json["square_image"]
  color = parsed_json["color"]
  slug = parsed_json["slug"]
  api_endpoints_to_documentation_urls = parsed_json["api_endpoints_to_documentation_urls"]
  webhook_setup_guide_url = parsed_json["webhook_setup_guide_url"]
  category_beta_status = parsed_json["category_beta_status"]
  new(
    name: name,
    categories: categories,
    image: image,
    square_image: square_image,
    color: color,
    slug: slug,
    api_endpoints_to_documentation_urls: api_endpoints_to_documentation_urls,
    webhook_setup_guide_url: webhook_setup_guide_url,
    category_beta_status: category_beta_status,
    additional_properties: struct
  )
end