ame => $args->{resourceName}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
=> $args->{trafficSplit}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
=> $args->{reviewStatus}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
=> $args->{validationError}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
ame => $args->{resourceName}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
value => $args->{value}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
ame => $args->{resourceName}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
{secondaryPaymentsProfileId}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
e => $args->{title}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
$args) = @_;
my $self = {};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
=> $args->{status}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
$args->{policyTopicEntries}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
args->{sharedNetworkTypeKey}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
ast;
use JSON::XS;
use JSON::WebToken;
# Class::Std-style attributes. Need to be kept in the same line.
# These need to go in the same line for older Perl interpreters to understand.
my %json_key_fil
e_path_of : ATTR(:name<json_key_file_path> :default<>);
my %impersonated_email_of : ATTR(:name<impersonated_email> :default<>);
my %additional_scopes_of : ATTR(:name<additional_scopes> :default<>);
#
$api_client, $properties) = @_;
my $ident = ident $self;
$json_key_file_path_of{$ident} = $properties->{jsonKeyFilePath}
|| $json_key_file_path_of{$ident};
$impersonated_email_of{$ident} =
handler = $self->get_oauth2_service_accounts_handler();
my $json_key_file_path =
$ENV{Google::Ads::GoogleAds::Constants::ENV_VAR_JSON_KEY_FILE_PATH};
my $impersonated_email =
$ENV{Google::
:GoogleAds::Constants::ENV_VAR_IMPERSONATED_EMAIL};
$auth_handler->set_json_key_file_path($json_key_file_path)
if $json_key_file_path;
$auth_handler->set_impersonated_email($impersonated_emai
g/overriding its properties.
$api_client->get_oauth2_service_accounts_handler()->set_json_key_file_path('json-key-file-path');
$api_client->get_oauth2_service_accounts_handler()->set_impersonated
if !$ref_type;
# A boolean value reference in a JSON object is evaluated as "JSON::PP::Boolean".
my @invalid_types = ("SCALAR", "ARRAY", "JSON::PP::Boolean");
return 0 if grep /^$ref_type/, @i
t ENV_VAR_REFRESH_TOKEN => "GOOGLE_ADS_REFRESH_TOKEN";
use constant ENV_VAR_JSON_KEY_FILE_PATH => "GOOGLE_ADS_JSON_KEY_FILE_PATH";
use constant ENV_VAR_IMPERSONATED_EMAIL => "GOOGLE_ADS_IMPERSONA
ments from a newly created
Google Ads API entity. These fields will be excluded when encoding the JSON HTTP
request payload.
=head3 Parameters
=over
=item *
I<hash_ref>: a hash reference to the ne
tion;
use Class::Std::Fast;
use LWP::UserAgent::Determined;
use HTTP::Status qw(:constants);
use JSON::XS;
use URI::Query;
use utf8;
use constant GET => "GET";
use constant POST => "POST";
# Class
lient> :default<>);
my %__lwp_agent_of : ATTR(:name<__lwp_agent> :default<>);
my %__json_coder_of : ATTR(:name<__json_coder> :default<>);
# Automatically called by Class::Std after the values for all
The 'convert_blessed' attributed should be enabled to convert blessed objects.
$__json_coder_of{$ident} ||= JSON::XS->new->utf8->pretty->convert_blessed;
}
# Sends a HTTP request to Google Ads API
$VERSION = ${Google::Ads::GoogleAds::Constants::VERSION};
# Called by JSON::XS to convert a blessed object to JSON.
sub TO_JSON {
return {%{shift()}};
}
1;
=pod
=head1 NAME
Google::Ads::Google
esponse, etc.
=head1 METHODS
=head2 TO_JSON
The C<TO_JSON> method is invoked by L<JSON::XS> in scalar context, to convert a
blessed object into JSON. As JSON cannot directly represent Perl objects,
we have
to enable the C<convert_blessed> attribute in L<JSON::XS> and define the C<TO_JSON>
method for each entity class to convert.
=head3 Returns
A scalar as the reference to the hash to convert